Modify Script So that it logs IP's and Redirects on 2nd Visit

This should be a very simple project for someone that is proficient in PHP. Attached are a couple scripts to help you get started.

These are the basic requirements that must be met. Do NOT bid if you can only do part of the task. All requirements must be met.


NOTE: Script must be written in PHP. I will be adding PHP code to a submission lead gathering form.

1. Script should detect IP based on parameter set in file, 1day, 2day, etc....After detecting the IP it needs to check the "[url removed, login to view]" to see if it exists. If it does not then then we need to write/log their IP address and redirect the visitor to "[url removed, login to view]". If the IP address already exists in this file then the visitor should be directed to "[url removed, login to view]".

NOTE: When writing the IP's to the logfile it should be in this format if you can. I would like to be able to go through some previous logs on my webserver so that I can cut and paste to add to this list.

[url removed, login to view]

[url removed, login to view]

2. The script also needs to write the counts to the file called "[url removed, login to view]" which you will see in the example.

3. We need a way to have an allowed list that I can hard-code several IP address that are always allowed to visit "[url removed, login to view]". So this can be in the PHP file directly or a TXT file in the same directory called "[url removed, login to view]" This will be used for my IP as the admin and a few others..

This is basically it... I have given you two scripts so that you can take bits and pieces from each or use you own to fullfill what I'm trying to accomplish. I suspect if you use the given code and come up with something you should be able to get this to work within 1hr - 1hr 1/2.

If you have any questions, please inquire.


I would like to get this started today. I had another freelancer try and they were unsuccessful. So the turn around can be same day or 1-2 day max.


I was hoping to be able to get this done for about $30 since some of the work has been started and you may be able to use bits and pieces from the existing code that I provided.


Once completed I would like to be able to just copy these PHP files up to my web server at the hosting company and test. This is being done in order to prevent duplicate lead submissions on a submission form. So this work on the front end is required.

Skills: PHP, Software Architecture

See more: www freelancer com s, www freelancer com it, writing in script, what to write on freelancer, what's up freelancer, what's freelancer com, what's freelancer, what's bid in freelancer com, what do we have to do in freelancer com, what does freelancer com cost, web server script, turn it in com, try's, test and turn up, software freelancer cost, set bits in c, set bits, script writing work, script ip address, requirements to work on freelancer com

About the Employer:
( 20 reviews ) Tomball, United States

Project ID: #2792281

Awarded to:


Easy job. See PM.

$30 USD in 1 day
(23 Reviews)

2 freelancers are bidding on average $30 for this job


Hi my friend, Will be a pleasure to help you with this job.

$30 USD in 1 day
(33 Reviews)