Autor | Zpráva | ||
---|---|---|---|
VladimirV Profil * |
#1 · Zasláno: 29. 3. 2012, 23:11:47
Mám hosting na savana.cz a bohužel mají zakázaný curl nebo file_get_contents. Potřebují načíst XML z URL adresy, abych xml mohl zpracovávat. To samé potřebuji u obrázku ... načíst ho z URL a uložit + použít.
Nevíte jaký script pro načtení z URL použít? |
||
Lamicz Profil |
#2 · Zasláno: 29. 3. 2012, 23:16:24
Co třeba fsockopen?
|
||
VladimirV Profil * |
#3 · Zasláno: 29. 3. 2012, 23:37:39
S tím se moc nepohnu dál. Napíše mě to chybu:
Warning: fsockopen() [function.fsockopen]: unable to connect to http://example.cz/testovaci.php?id=34344sda4:80 (Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?) in /mnt/data/accounts/i/ivanvilim/data/www/webwebweb/cron/import.php on line 31 Unable to find the socket transport "http" - did you forget to enable it when you configured PHP? (154965536) Script k tomu používám: $fp = fsockopen("http://example.cz/testovaci.php?id=34344sda4", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET / HTTP/1.1\r\n"; $out .= "Host: http://example.cz/testovaci.php?id=34344sda4\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { $xml_url = fgets($fp, 128); } fclose($fp); } $xml = simplexml_load_string($xml_url); |
||
Časová prodleva: 11 let
|
0