I have a link
http://www.makayama.com/android/vara.png
Now i need a curl execution on a page on my local server which will get the png content and display it back to the user.
So for example, if the user types http://www.mysite.com/mypage.php, he/she should be able to view the above image
redirect is also another idea but i need the content to be displayed hiding the actual url.
Have done the following but i get the values as junk. This same code works if i try to get an xml file from a location.
Code: Select all
$URL = 'http://www.makayama.com/android/vara.png';
//initiate the curl
$ch = curl_init();
//set the URL to the curl handle
curl_setopt($ch, CURLOPT_URL, $URL);
//ignore header
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch,CURLOPT_BINARYTRANSFER,true);
// grab URL and pass it to the browser
curl_exec($ch);
// close CURL resource, and free up system resources
curl_close($ch);