Fix PHP files(s)
I have a trade system based on two files, a track.php and out.php, and a mysql database.
The track.php file logs the referring domain (after trimming the www.), and the ip
The out.php file is supposed to log the domain that referred the visitor originally, in addition to id, plug_id , referrer , ip, and time . However, the only time the domain is logged into database is when there is a www. before the domain. This only happens in error because the www. is supposed to be trimmed.
I need that problem corrected.
The second modification I need is also to the out.php file. If an out.php?id=# has already been clicked once by a user, the second time it must generate a random link. I think the best way to do this would be to check to see if the ip addresss of that visitor already has an entry for that plug_id. It would need to have a time interval to ensure it doesn`t take too long.
I hope some of that makes sense. If you have any questions please ask. I think it sounds more complicated than it probably is.