$mysREF=$_SERVER['HTTP_REFERER'];
$mys=$_SERVER['QUERY_STRING'];
$mys2=$_SERVER['REMOTE_HOST'];
$mys3=$_SERVER['REMOTE_PORT'];
$mys4=$_GET[0];
$allMyS=explode("=",$mys);
$theIP=$allMyS[1];
$theKeyIMAGE=str_replace("_","+",$allMyS[0]);
$mysREF_TIT=explode(".",$mysREF);
if(strpos($mysREF_TIT[0],"www")>0){
$mysREF_TITolo=$mysREF_TIT[1];
}
else{
$mysREF_TITolo=$mysREF_TIT[0];
}
$mysREF_TITolo=str_replace("http://","",$mysREF_TITolo);
include "dbc.lib";
$risultato_str_list = mysql_db_query($db, "SELECT LINK, CONTENTS from urls where LINK like '$mysREF_TITolo' order by DATA DESC limit 1 ");
if(!$risultato_str_list) {
echo mysql_errno().": ";
echo mysql_error()."
";
mysql_close($cnn_id);
exit;
}
else {
$riga=mysql_fetch_row($risultato_str_list);
if($riga[0]==$mysREF_TITolo){
$theDOC=$riga[1];
}
else{
$theDOC=@file_get_contents($mysREF);
$theDOCins=addslashes($theDOC);
$myDATEnow=date("Y/m/d-H:i:s");
$risultato_strins_list = mysql_db_query($db, "INSERT into urls values (0,'$mysREF_TITolo','$myDATEnow','$theDOCins');");
}
mysql_free_result($risultato_str_list);
}
/*$theCONTent=@file_get_contents("http://www.ip2location.com/".$theIP);
$theCONTent=str_replace('src="http://','#@@@@#',$theCONTent);
$theCONTent=str_replace('src="','src="http://www.ip2location.com/',$theCONTent);
$theCONTent=str_replace('#@@@@#','src="http://',$theCONTent);
$theCONTent=str_replace('id="txtLookup">','id="txtLookup">'.$theIP.'',$theCONTent);
$theCONTent=str_replace('action="','action="http://www.ip2location.com/',$theCONTent);
$theCONTent=str_replace('href="http://','#@@@@#',$theCONTent);
$theCONTent=str_replace('href="','href="http://www.ip2location.com/',$theCONTent);
$theCONTent=str_replace('#@@@@#','href="http://',$theCONTent);
$theCONTent=str_replace('background="','background="http://www.ip2location.com/',$theCONTent);*/
$TheTITLE=explode("
|