border: 1px solid #d2d2d2; padding: 0px 8px 0px 8px; color: #a19999; font-size: 12px; height: 25px; width: 165px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; margin:0px; } .submitbutton{ background:#F66303; border: 1px solid #F66303; text-shadow: 1px 1px 1px #333; box-shadow: 3px 3px 3px #666; font:bold 12px Arial, sans-serif; color: #fff; height: 25px; padding: 0 12px 0 12px; margin: 0 0 0 5px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; cursor:pointer;}

Receive all updates via Facebook. Just Click the Like Button Below

You can also receive Free Email Updates:

Powered By Blogger Widgets

Related Posts Plugin for WordPress, Blogger...

Pages

Saturday, October 22, 2011

Making your own ip catcher



This will get the ip of the user that goes to your page. The log will be saved in the same map as ip_log.txt. The user will be redirected to (in this case) Google



Code:


<?php
$ip = $_SERVER['REMOTE_ADDR'];
$dt = date("l dS \of F Y h:i:s A");
$file=fopen("ip_log.txt","a");  //ip_log.txt = Where it needs to save to. Here it must be hosted in same map !
$data = $ip.' '.$dt."\n";
fwrite($file, $data);
fclose($file);
header( 'Location: http://www.google.com' ) ; //www.google.com = Site where it needs to redirected to
?>


Download Code here

No comments:

Post a Comment

Follow Us

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More