Originariamente inviato da Santino83_02
che io sappia, file_exists controlla l'esistenza di un file nel filesystem o nella rete, non via url... e neanche nel manuale ce n0è traccia....in compenso ho trovato questo che sembrerebbe andare al caso tuo:
http://www.php.net/manual/en/functio...ists.php#85246
vedi se ti funge
innanzitutto grazie, si in effetti il funzionamento di file_exist secondo php.net è quello da te indicato, purtroppo per il resto nulla da fare, ho utilizzato lo script da te indicato con curl e un secondo script e anche dal secondo mi visualizza
HTTP/1.1 404 Not Found etc. etc.
<?php
echo "
";
echo "ultima prova ";
echo "
";
$url="http://www.corrieredellosport.it/giocatori/SerieA/Mauricio Isla/p48852";
$handle = curl_init($url);
if (false === $handle)
{
return false;
}
printf ("valore di handle: $handle");
curl_setopt($handle, CURLOPT_HEADER, false);
curl_setopt($handle, CURLOPT_FAILONERROR, true); // this works
curl_setopt($handle, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") ); // request as if Firefox
curl_setopt($handle, CURLOPT_NOBODY, true);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, false);
$connectable = curl_exec($handle);
curl_close($handle);
echo $connectable;
echo "
";
echo "--------------------------------------------------";
echo "
";
////////////////
///////////////PROVA SECONDO SCRIPT
////////////////
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.corrieredellosport.it/giocatori/SerieA/Mauricio Isla/p48852");
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
echo $data;
?>
ultima prova
valore di handle: Resource id #2
--------------------------------------------------
HTTP/1.1 404 Not Found Date: Fri, 05 Aug 2011 13:51:39 GMT Server: Apache Accept-Ranges: bytes Vary: Accept-Encoding Connection: close Content-Type: text/html
Non credo che sia un ban perche' non dovrebbe cmq dare un 404 , forse un ban a livello di htaccess, oppure perche' manca l'estensione, qualunque sia la ragione per me rimane veramente un rebus. Grazie Cmq.

Rispondi quotando