Reputation: 689
I'm trying to retrieve some remote XML from another source using PHP. I understand that you're not supposed to enable allow_url_fopen
for security reasons, so I'm not really sure how to go about doing this.
Upvotes: 0
Views: 204
Reputation: 151604
Allow_url_fopen isn't unsafe or scary or dangerous per se, it's just that quite often it is disabled on shared hosting for various reasons.
If you control your own hosting environment, I'd say go with it. Otherwise, use curl as suggested.
Upvotes: 0
Reputation: 30167
You might want to use curl
for that. If your XML is available via HTTP, first curl
it, then feed it to the XML parser.
Upvotes: 3