diff --git a/index.php b/index.php index 1928e63..a04c4f2 100644 --- a/index.php +++ b/index.php @@ -125,7 +125,9 @@ define('CONN', (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "")?'http':'ht
-

Example PHP script

+

Examples

+ +

Simple link via img tag


@@ -138,6 +140,26 @@ define('CONN', (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "")?'http':'ht
 ?>
                         

+ + +

Proxy script to download the image via curl

+

+

+


+<?php
+    $targeturl = 'http://www.xkcd.com';
+    $url = ':///api.php?url='.rawurlencode($targeturl);
+	    
+    $ch = curl_init($url);
+    $fp = fopen('xkcd.jpg', 'wb');
+    curl_setopt($ch, CURLOPT_FILE, $fp);
+    curl_setopt($ch, CURLOPT_HEADER, 0);
+    curl_exec($ch);
+    curl_close($ch);
+    fclose($fp);
+?>
+                        
+