添加到 trunk
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@131 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/*
|
||||
* Filename.......: image_cache.php
|
||||
* Author.........: Troy Wolf [[email protected]]
|
||||
* Last Modified..: Date: 2005/06/21 10:30:00
|
||||
* Description....: Companion script to clas_http.php. When used in conjunction
|
||||
with class_http.php, can be used to "screen-scrape" images
|
||||
and cache them locally for any number of seconds. You use
|
||||
this script in-line within img tags like so:
|
||||
<img src="image_cache.php?ttl=300&url=http%3A%2F%2Fwww.somedomain.com%2Fsomeimage.gif" />
|
||||
(You must url encode the url within the src attribute.)
|
||||
*/
|
||||
|
||||
/*
|
||||
Include the http class. Modify path according to where you put the class
|
||||
file.
|
||||
*/
|
||||
require_once('class_http.php');
|
||||
|
||||
$h = new http();
|
||||
$h->fetch($_GET['url'], $_GET['ttl']);
|
||||
header("Content-Type: image/jpeg");
|
||||
echo $h->body;
|
||||
?>
|
||||
Reference in New Issue
Block a user