<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Add Submitter IP to Tables and Validate Form (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Add Submitter IP to Tables and Validate Form
#752
Mystic (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Add Submitter IP to Tables and Validate Form 3 Years, 4 Months ago Karma: 0  
Hi everyone, I haven't been around in awhile. I used to go by the name Highlander here. Lately my site had alot of submissions for data recovery software, etc. The website address and templates were different but the all the templates looked like cookie cutter purchased templates. When I searched through my server logs I found they were all coming from the same set of IP range. I wanted an easier way though to check the IP address of the submitter without having to search through an 80 Mb log file.

With this mod when a user submits a website their IP address with be saved to the Temp table. When you pull up the Validate Site form you will see the submitters IP on the form.
When you validate the site the Submitter IP address will be saved to the Links table, just in case you ever need to go back and check IP's. I coded this on the old version 2.0.1.0b Non SEF, but it should work on the new SEF version as well.


Code:

Go to your database with phpMyAdmin and add the field "SubmitterIP" to the phplinks_links and phplinks_temp tables. Set varchar to 20 Open include/add.php Find code around line 24: $submit_add=$_POST['submit_add']; After it add: $SubmitterIP = $_SERVER['REMOTE_ADDR']; Around line 232 find code: $insert = sql_query(" insert into $insert_table( SiteName, SiteURL, RecipURL, LastUpdate, Added, Description, Category, Country, UserName, Password, Hint, Email ) values ( '$SiteName', '$SiteURL', '$RecipURL', now()+0, now()+0, '$Description', '$Category', '$Country', '$UserName', password('$PW'), '$Hint', '$Email' Change it to: $insert = sql_query(" insert into $insert_table( SiteName, SiteURL, RecipURL, LastUpdate, Added, Description, Category, Country, UserName, Password, Hint, Email, SubmitterIP ) values ( '$SiteName', '$SiteURL', '$RecipURL', now()+0, now()+0, '$Description', '$Category', '$Country', '$UserName', password('$PW'), '$Hint', '$Email', '$SubmitterIP' ------------------------------------------ Open admin/validate.php Find code around line 49: $insert = sql_query(" insert into $tb_links ( ID, SiteName, SiteURL, RecipURL, Description, Category, Country, Email, LastUpdate, Added, UserName, Password, Hint ) values ( '', '$SiteName', '$SiteURL', '$RecipURL', '$Description', '$Category', '$Country', '$Email', now()+0, now()+0, '$UserName', '$Password', '$Hint' Change it to: $insert = sql_query(" insert into $tb_links ( ID, SiteName, SiteURL, RecipURL, Description, Category, Country, Email, LastUpdate, Added, UserName, Password, Hint, SubmitterIP ) values ( '', '$SiteName', '$SiteURL', '$RecipURL', '$Description', '$Category', '$Country', '$Email', now()+0, now()+0, '$UserName', '$Password', '$Hint', '$SubmitterIP' Find code around line 176: <tr> <td class="text">Email</td> <td><input class="small" type="text" name="Email" value="<?=$rows[Email]?>" size="35"></td> </tr> After it add: <tr> <td class="text">Submitter IP</td> <td><input class="small" type="text" name="SubmitterIP" value="<?=$rows[SubmitterIP]?>" size="35"></td> </tr>
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
      Topics Author Date
    thread link
Add Submitter IP to Tables and Validate Form
Mystic 2009/01/20 18:13
    thread link
thread linkthread link Re:Add Submitter IP to Tables and Validate Form
adktech 2009/01/24 16:09
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008