Autor | Zpráva | ||
---|---|---|---|
mar Profil * |
#1 · Zasláno: 19. 2. 2008, 08:59:45
Dobrý den,
zkouším na serveru, kde je zapnutý SAFE MOD, níže uvedený skript. V safe mode mi to nefunguje. Dá se nějak upravit, aby fungoval? /* * Private function called by @func preremplir_Formulaire() to detect site thumbnails * @param string methode : which method should the function use to find the thumbnail ? (ascreen, thumshots...) * @param string url : URL of the website concerned by the detection * @return string : URL of the thumbnail found if success, else null */ function detect_images($methode,$url) // Détecter une image via AscreeN, Thumbshots ou Alexa { $url_image = null; if ( $methode=='ascreen' ) { $urlt = rtrim($url,"/"); if ( @getimagesize("$urlt/ascreen.jpg") ) { $url_image = "$urlt/ascreen.jpg"; }; } elseif ( $methode=='thumbshots' ) { if ( ($a=@getimagesize("http://open.thumbshots.org/image.pxf?url=$url")) && $a[0]>50 ) { $url_image = "http://open.thumbshots.org/image.pxf?url=$url"; }; } elseif( $methode=='thumbzor' ) { if ( ($a=@getimagesize("http://www.thumbzor.com/tel.php?url=$url")) && $a[0]>50 ) { $url_image = "http://www.thumbzor.com/tel.php?url=$url"; }; } elseif( $methode=='websnapr' ) { if ( ($a=@getimagesize("http://images.websnapr.com/?url=$url&size=S")) && $a[0]>50 ) { $url_image = "http://images.websnapr.com/?url=$url&size=S"; }; } elseif ( $methode=='alexa' ) { $purl = parse_url("http://thumbnails.alexa.com/image_server.cgi?size=small&url =$url"); $fp = @fsockopen($purl['host'], 80, $errno, $errstr, 5); @fputs($fp, "GET $purl[path]?$purl[query] HTTP/1.1\r\nHost: $purl[host]\r\n\r\nConnection: Close\r\n\r\n"); $ok = preg_match("!Location: /images/smalljpeg/!",@fread($fp,210)); @fclose($fp); if ( $ok ) { $url_image = "http://thumbnails.alexa.com/image_server.cgi?size=small&url=$url"; }; }; return $url_image; } |
||
Marcus Flintus Profil |
#2 · Zasláno: 19. 2. 2008, 22:52:32
ano.
|
||
Jan Tvrdík Profil |
#3 · Zasláno: 19. 2. 2008, 23:01:25
Marcus Flintus
:) |
||
mar Profil * |
#4 · Zasláno: 20. 2. 2008, 13:50:12
Děkuji
můžete mi ještě poradit jak? |
||
Marcus Flintus Profil |
#5 · Zasláno: 21. 2. 2008, 14:19:16
Problém je v řádcích
$fp = @fsockopen($purl['host'], 80, $errno, $errstr, 5); @fputs($fp, "GET $purl[path]?$purl[query] HTTP/1.1\r\nHost: $purl[host]\r\n\r\nConnection: Close\r\n\r\n"); $ok = preg_match("!Location: /images/smalljpeg/!",@fread($fp,210)); @fclose($fp); protože v safe modu funkce fsockopen (a fce od ní odvozené) nefungují. Musíš za ně hledat náhradu. |
||
mar Profil * |
#6 · Zasláno: 22. 2. 2008, 09:17:11
myslite pomoci CURL?
|
||
Časová prodleva: 3 dny
|
|||
mardon Profil * |
#7 · Zasláno: 25. 2. 2008, 11:58:04
Hledám někoho, kdo by mi byl ochoten pomoci se zprovzněním aplikace
|
||
Časová prodleva: 16 let
|
0