Forum Moderators: coopster
I have a small problem with my script:
<img src="px.png" width="1" height="1" />
<?php
require("stats/required.php");
header("Location: [google.com");...]
?>
I want the "page" run the required.php (it's a counter),
but it don't run, I tried it with a text on the page too but what I got it NO text!
So I think it skips everything and just use the header part. Is there any way to fix this script to run the required.php and redirect at the same time?
Thank You very much!
if (file_exists("stats/log/blocked/list"))
{
$mamamu = fopen("stats/log/blocked/list","r");
while(!feof($mamamu))
{
$basi = fread($mamamu,5000);
}
fclose($mamamu);
}
if (preg_match ("/".$HTTP_SERVER_VARS['REMOTE_ADDR']."/i", $basi))
{
}
else
{
$language = "&language=".$HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'];
$host = "&host=".$HTTP_SERVER_VARS['HTTP_HOST'];
$ide = preg_replace("/&/","RUSIN40",$HTTP_SERVER_VARS['HTTP_REFERER']);
$ref = "&ref=".$ide;
//$url = "&url=".$HTTP_SERVER_VARS['phpSelf'];
$browser = "&browser=".$HTTP_SERVER_VARS['HTTP_USER_AGENT'];
$remadr = "&remadr=".$HTTP_SERVER_VARS['REMOTE_ADDR'];
$remhos = "&remhos=".gethostbyaddr($_SERVER['REMOTE_ADDR']);
setlocale (LC_TIME, "en_UK");
$year = "&year=".strftime ("%Y");
$month = "&month=".strftime ("%m");
$month_name = "&month_name=".strftime ("%B");
$day_week = "&day_week=".strftime ("%A");
$week = "&week=".strftime ("%W");
$day = "&day=".strftime ("%d");
$hour = "&hour=".strftime ("%H");
$minute = "&minute=".strftime ("%M");
$second = "&second=".strftime ("%S");
$day_of_year = "&day_of_year=".strftime ("%j");
$uri = $HTTP_SERVER_VARS['REQUEST_URI'];
$url = stripslashes("http://".$HTTP_SERVER_VARS['SERVER_NAME'].$uri);
$ide = preg_replace("/&/","RUSIN40",$url);
$url = "&url=".$ide;
$unique = $browser.$remadr."\n";
?>
<script language="javascript">
<!--//
var cpu = window.navigator.cpuClass;
var platform = window.navigator.platform;
if (navigator.appname != 'Netscape') {color= "?color="+screen.colorDepth+"&cpu="+cpu+"&platform="+platform;}
else {color = "?color="+screen.pixelDepth;}
avail = "&avail="+screen.availwidth+"x"+screen.availheight;
res = "&res="+screen.width+"x"+screen.height;
isize = '" width="0" height="0" border="0" hspace="0" vspace="0"';
img = '<div id="counter" style="position:absolute; left:0px; top:0px; width:1; height:1; z-index:1"><img name="img" src="stats/log.php'+color+'<? echo $language. $host. $ref. $browser. $url. $remadr. $remhos. $year. $month. $month_name. $day_week. $week. $day. $hour. $minute. $second. $day_of_year. $uri;?>'+avail+res+isize+'"></div>';
document.write(img);
//-->
</script>
<?
}
?>
[edited by: jatar_k at 3:31 pm (utc) on June 6, 2008]
[edit reason] fixed sidescroll [/edit]
yes I can see it!<body><script type="text/javascript" charset="utf-8" src="http://www.example.com/lib/webmaster/webmaster.js?scr=1&username=skhsarki&host=skhsarki.extra.hu&rid=1403579003"></script><script language="javascript">
<!--//
var cpu = window.navigator.cpuClass;
var platform = window.navigator.platform;
if (navigator.appname != 'Netscape') {color= "?color="+screen.colorDepth+"&cpu="+cpu+"&platform="+platform;}
else {color = "?color="+screen.pixelDepth;}
avail = "&avail="+screen.availwidth+"x"+screen.availheight;
res = "&res="+screen.width+"x"+screen.height;
isize = '" width="0" height="0" border="0" hspace="0" vspace="0"';
img = '<div id="counter" style="position:absolute; left:0px; top:0px; width:1; height:1; z-index:1"><img name="img" src="stats/log.php'+color+'&language=hu-hu,hu;q=0.8,en-us;q=0.5,en;q=0.3&host=skhsarki.extra.hu&ref=&browser=Mozilla/5.0 (Windows; U; Windows NT 6.0; hu; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.12;MEGAUPLOAD 1.0&url=censored#*$!#*$!'+avail+res+isize+'"></div>';
document.write(img);
//-->
</script>
[edited by: eelixduppy at 6:33 pm (utc) on June 5, 2008]
[edit reason] example.com [/edit]
when you use the header function you redirect to the other page
if you can't program how did it get this far? You're going to have to learn a bit if you are going to make this work
you could start with this
header() [php.net]