|
Posted by Pseudonyme on 12/07/07 16:51
error log = 130% access_log in terms of weight !
Dear Sirs,
We thank you for your advise and answer your request. We prey to be as
clear as possible.
1. error log (130% the weight of the access_log)
PHP Notice: Undefined index: HTTP_REFERER in /home/virtual/site3/fst/
var/www/html/cpm_cost.php on line 8
[client 83.155.157.238]
PHP Notice: Undefined index: cpm9 in /home/virtual/site3/fst/var/www/
html/cpm_cost.php on line 45
[client 83.155.157.238]
PHP Notice: Undefined variable: redirect in /home/virtual/site3/fst/
var/www/html/cpm_cost.php on line 106
line 8 : $http_ref= $_SERVER['HTTP_REFERER'];
line 45 :
42. for($j=0; $j <= $i;$j++)
43.{
44.
45. $prog = $_COOKIE['cpm'."$j"];
line 106 :
$redirect .='Location:'.$uploadpath;
2. Extract from cpm_cost. php
<?
error_reporting(0);
include_once("...");
header("P3P: policyref=\"http://www.gle-mosco.com/adveruser/p3p.xml
\",CP=\"NON DSP COR CURa PSA PSD OUR BUS NAV STA\"");
$http_ref= $_SERVER['HTTP_REFERER'];
$affsite=$_REQUEST['affsite'];
$banner=$_REQUEST['banner'];
$date = time();
$capping = 300*60;
$i=0;
$cookieok=0;
while(isset($_COOKIE['cpm'."$i"]) )
{
$i++;
}
for($j=0; $j <= $i;$j++)
{
$prog = $_COOKIE['cpm'."$j"];
$array = preg_split('/#/',$prog);
if ($array[0] ==$affsite && $array[1] == $banner && (($array[2] +
$capping) > $date) )
{
$cookieok = 1;
}
else if ($array[0] ==$affsite && $array[1] == $banner && (($array[2]
+ $capping) < $date) )
{
$cookieok = 2;
setcookie("cpm".$j,$affsite."#".$banner."#".$date,time()
+24*60*60*365*10);
}
}
if($cookieok == 0)
{
setcookie("cpm".$i,$affsite."#".$banner."#".$date,time()
+24*60*60*365*10);
}
if($cookieok == 2)
{
$cookieok=0;
}
$qryStatus="Select a.status as status, pi.status as prog_status from
Tbl_Affiliate_Program_Status a,Tbl_Creative_Information b,
Tbl_Program_Information pi where a.website_id=$affsite and b.banner_id
= $banner and b.program_id = a.program_id and pi.program_id =
b.program_id";
$rsStatus=select_query($qryStatus);
$site=$affsite;
if($rsStatus['0']['status']=='a' && $rsStatus['0']
['prog_status']=='e' )//only for accepted affiliates
{
$sqlup = "select upload_path,append_type from
Tbl_Creative_Information where banner_id = $banner";
$rsup = select_query($sqlup);
if($rsup['0']['append_type'] != 'h')
{
$uploadpath = $rsup[0]['upload_path'];
}
if(count($uploadpath)!=0)
{
$str = split("#",$uploadpath);
if(count($str) != 0)
{
if(preg_match("/data/", $str[0], $matches)!='')
{
$redirect .='Location:'.$str[0].$affsite;
}
else
{
$redirect .='Location:'.$uploadpath;
}
}
}
if($rsup['0']['append_type'] != 'h') //²²² imagegif($im);
header ($redirect);
$gi = geoip_open("gle-mosco_global/geoIP/GeoIP.dat",
GEOIP_STANDARD);
{
if (!((geoip_country_name_by_addr($gi, "$REMOTE_ADDR")=="United
States") ||
(geoip_country_name_by_addr($gi, "$REMOTE_ADDR")=="Canada") ||
(geoip_country_name_by_addr($gi, "$REMOTE_ADDR")=="Switzerland")
||
(geoip_country_name_by_addr($gi, "$REMOTE_ADDR")=="Belgium") ||
(geoip_country_name_by_addr($gi, "$REMOTE_ADDR")=="France") ||
(geoip_country_name_by_addr($gi, "$REMOTE_ADDR")=="United Kingdom")
||
(geoip_country_name_by_addr($gi, "$REMOTE_ADDR")=="Luxembourg")))
{} else {
if($cookieok == 0)
{
$qryInsert="insert into CPM_TEMP_1H (banner_id,affsite_id)
values($banner,$site)";
update_query($qryInsert);
}
}
}
}
?>
Navigation:
[Reply to this message]
|