Created
October 1, 2011 15:59
-
-
Save lloc/1256238 to your computer and use it in GitHub Desktop.
my_fopen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_fopen ($url) { | |
$ch = curl_init ($url); | |
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); | |
$content = curl_exec ($ch); | |
$errno = curl_errno ($ch); | |
curl_close ($ch); | |
return (array ($errno, $content)); | |
} | |
list ($error, $result = my_fopen ("http://lloc.de/"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related post: http://lloc.de/fopen-gesperrt-und-was-nun.html