|
Posted by Krustov on 07/21/07 16:44
<comp.lang.php>
<Michael Fesser>
<Mon, 16 Jul 2007 05:35:39 +0200>
<nfpl93t03dao2bp2kprnlrgnol514liuon@4ax.com>
> Using the IP to "identify" a user is even more unreliable than anything
> else
>
Not everybody is looking 100% accuracy .
$klock being set a value in the config file .
<?php
$rambo=$_SERVER['REMOTE_ADDR']; $rambo=str_replace(".","_",$rambo);
$demo=$_SERVER['HTTP_USER_AGENT']; $wsx=strtolower($demo); $witt="zz";
$qaz=strpos($wsx,"windows"); if ($qaz==true) {$witt="ie";}
$qaz=strpos($wsx,"firefox"); if ($qaz==true) {$witt="ff";}
$qaz=strpos($wsx,"safari"); if ($qaz==true) {$witt="sf";}
$qaz=strpos($wsx,"opera"); if ($qaz==true) {$witt="op";}
$qaz=strpos($wsx,"mac"); if ($qaz==true) {$witt="mc";}
$wsx=$rambo . "_" . $witt; $rambo=$wsx;
$wsx=time()+$klock;
$filenamecu="demo/$rambo.php"; $fpcu=fopen($filenamecu,"w");
fwrite ($fpcu,$rambo); fwrite ($fpcu,"\n");
fwrite ($fpcu,$wsx); fwrite ($fpcu,"\n");
fclose ($fpcu);
?>
Navigation:
[Reply to this message]
|