Well in my script there is a line that reads file through the function readfile(), the code is shown below:
header ($contentType);
$status = readfile($image);
if($status == "" or $status == "false" or $status == "FALSE"){
// Reading the file failed, so show an error...
header ("text/plain");
die("Readfile appears to be disabled on your host.");
}
The problem now is that some users of my script have the property allow_url_fopen disabled on their webhost, and there is no way for them to change this setting in php.ini. I heard that it is possible to bypass this restriction by using curl functions, but I have no idea what they are and how to use them. Can anyone of you please let me know how to re-write the above code into curl functions? Even tips are appreciated. Also is curl functions better than readfile(), if so I may consider revising my old code with curl functions to improve the script.