Reading external files - the safe way

/ Published in: PHP
Save to your folder(s)

this comes from YAPB plugin for WordPress. kudos to the author.
(there are some functions that are deprecated in PHP 5.2+ - you'll need to replace eregi with the mb_ version). This should be quite failsafe, regardless if curl is installed or the settings in your php.ini (allow_url_fopen), etc.

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.