Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = $_GET['ur'];
- header('Content-Type: image/jpeg');
- header('Content-Type: image/png');
- header('Content-Type: image/gif');
- if($file != ''){
- $cache_expire = 60*60*24*365;
- header("Pragma: public");
- header("Cache-Control: maxage=". $cache_expire);
- header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $cache_expire).' GMT');
- //The cURL stuff...
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
- $picture = curl_exec($ch);
- curl_close($ch);
- //Display the image in the browser
- echo $picture;
- }
- exit;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement