Site Statistics
 
Threads: 3,907
Posts: 17,146
Members: 2,918
Users Online: 4
Newest Member: alina.olah


Go Back   PC101 > The Internet, Web Design & Networking > Web Design and Development

Web Design and Development Design techniques, conepts, HTML, scripts, software, reviews, sponsors and affiliate programs.


Reply
 
LinkBack Thread Tools Display Modes
Old 04-16-2006, 03:10 PM   #1
Member
 
Join Date: Apr 2006
Posts: 31
Rep Power: 0 MM357 is on a distinguished road
A PHP Question

I hope to know how to find the ip of a visitor.

I intend to use this to develop an advertising system that can recognize unique clicks and cheats.

If anyone have valuable information that may help me in this work .. Please, post it here !
MM357 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-16-2006, 08:52 PM   #2
Junior Member
 
Join Date: Apr 2006
Posts: 11
Rep Power: 0 0xide is on a distinguished road
no offence its impossible to stop cheating the way you want to stop it... You will most likely just piss off the people trying to use ur ad system.
0xide is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-17-2006, 08:41 PM   #3
Forum Staff
 
Lyte's Avatar
 
Join Date: Oct 2005
Location: Good ol' U.S. of A
Posts: 3,233
Rep Power: 6 Lyte is on a distinguished road
Send a message via MSN to Lyte Send a message via Yahoo to Lyte Send a message via Skype™ to Lyte
Cheats for what... like Google Adsense?? I'm sure there's some kind of program out there to catch cheating clicks. Google uses one!

Lyte
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Lyte is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-19-2006, 06:37 PM   #4
Senior Member
 
OulZac's Avatar
 
Join Date: Apr 2006
Location: Wilbur
Posts: 346
Rep Power: 3 OulZac is on a distinguished road
This code:

PHP Code:
<?php echo $_SERVER['REMOTE_ADDR']; ?>
would show you on the actually page they vist their IP.

You can use this to log it to a file:

PHP Code:
<?
$IP 
$_SERVER['REMOTE_ADDR'];
$DT date("F j, Y, g:i a")

$IPFile "IPFile.txt";
$fh fopen($IPFile'w') or die("can't open file");

$stringData "$IP\n";
fwrite($fh$stringData);
$stringData "$DT\n";
fwrite($fh$stringData);
fclose($fh);
?>
you would have to create the file IPfile.txt first, just a blank file, with permissions 644.
that will just log each time an ip visits showing the ip and the data and time they accessed the site.

And if your really serious about this, I can show you more code to make it work the way you want it to, so they cant cheap, this is the simple basic thing that is middle of what google uses to track.
__________________
In the beginning, the Universe was created. This made a lot of people angry, and has been widely regarded as a bad idea.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Showing people there IP for no apparent reason!
OulZac is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ipod question... Lyte Gadgets and Gizmos 6 12-23-2006 12:02 AM
Install PHP, Apache & MySQL parag2006 Software Development 4 06-20-2006 10:23 AM
A Dreamweaver Question MM357 Graphic/Utility/Business Software 0 04-16-2006 02:37 PM
Internet programming languages other than PHP? cmpolis Software Development 10 01-02-2006 06:08 AM
Good PHP resources! ibnuasad Software Development 2 12-15-2005 12:35 AM



All times are GMT -5. The time now is 11:02 AM.

Powered by vBulletin Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5