Write a super simple PHP script


I have a one-page short (roughly 200 lines of code) PHP+HTML file. When the user loads the page he sees a simple form with several input fields and, of course, a button.

When the button is pressed, the input is sent through the POST protocol to PHP_SELF. Here I have a function which uses the input provided by the user and some other variables defined by me to send another POST request using CURL to a remote server, to which I do not have any type of access.

Here is what I want:

Some type of security measure which will not let the user use the form more often then I will allow him to(a value which I want to be able to define in seconds inside the PHP script).

So basically, when the user submits the form you will have to store the IP and the exact time when he used the form. Then, if that IP will visit the webpage again before the required time(which I have previously established in the PHP) passed, instead of showing him the form I want you to show him the text: "This IP address($ip) has to wait $time seconds before being able to use the form again. Please refresh the webpage when the counter reaches 0! ". Also, as a security measure, I want him to be shown the same page even if he clicks the button before the required time has passed(in case he opened the same page in 2 tabs simultaneously, so that the second request to the server has passed the initial verification since he hasn't used the from yet).

As I think you may have figured out, $ip and $time are variables. Also, I want you to write some simple javascript to countdown the remaining seconds(because the PHP script will only echo the seconds remained at the very moment the user tried to use the form again, but I want the user to always know how much time he has to wait without clicking that refresh button).

To sum up, you will have to provide me:

[url removed, login to view] a piece of code to put at the very beginning of my script which will check if the IP has used the form in the past X(established by me)seconds.

-if it did, echo the HTML with the text from above and the simple JS to do the countdown;

-if it did not, then do nothing and let my existing script do it's job.

[url removed, login to view] a piece of code to integrate into my existing function which will do the security check before letting my function send the CURL request to the other server(basically server side validation) explained above.

-if the IP was trying to cheat, echo the same HTML text with countdown as at point 1;

-if the request my legitimate, do nothing and let my existing function do the rest.

[url removed, login to view] a piece of code to integrate into my function after the piece from point 2 which will store the IP and time in a file(required for point 1 and 2).

Please do not use databases. Keep it as simple as possible. Store the IP and time into a file.

Thank you!

Habilidades: HTML, Javascript, PHP

Veja mais: type of button in php with code, super job, script ip address, js write, ip address script, how to write a code in php, address write, remote php job, remote job php, write some very simple, write one page, write a simple, write a simple php script, simple clicking job, php html javascript, always write, input verification code, php check input type, validation script php, php post remote, html super, curl form value, php html text, refresh existing webpage, check input function php

Acerca do Empregador:
( 1 comentário ) Botosani, Romania

ID do Projeto: #5129909

Concedido a:


Hi! Although you have outlined teh functionality quite well I have some questions. Like: 1) SHould it trigger the "verification timeout" ONLY if the first submission to the other site (CURL) was successful or rega Mais

$30 USD em 0 dias
(326 Comentários)

12 freelancers are bidding on average $76 for this job


Hello, We have long experience in Graphic Design, HTML5, jQuery, User Interface / SEO, Joomla, Wordpress, Magento,... and PHP. I am ready to start on your project. You can check wordpress sites we did on our portfol Mais

$123 USD in 2 dias
(314 Comentários)

Hello, With 99% completion rate, 650+ successfully completed projects, and a 5.00 reputation (maximum possible, 5.0) (Yes, not even 4.99 !!)... you can never go wrong choosing me :) I look forward to your reply. Mais

$154 USD in 2 dias
(489 Comentários)

10+ years experience. 500+ projects completed successfully. I am very interested in this project. Ready to start ASAP.

$99 USD in 3 dias
(178 Comentários)

Well,Stefan(?) Your have described it clear enough so that I have no more questions. Just 2 options: [url removed, login to view] need remove expired IPs for the file or it will get bigg and inefficient. [url removed, login to view] it better to refresh it autom Mais

$61 USD em 1 dia
(41 Comentários)

sir i have read your requirement . sir we can do this job because we have 10 years of experience in webdesign and development we are expert in php with mysql ,javascript ,jquery ,ajax,html5 css3 smarty photoshop e Mais

$66 USD in 2 dias
(52 Comentários)

Hey I have gone through the details I can do this job! Will you award me the project after i deliver the script to you? Although i have a question for you. The person who will be posting this form you are talking w Mais

$30 USD em 1 dia
(13 Comentários)

Hi I'm sure I could achieve your goals.. I'm a 12 year experienced PHP developer... I will deliver high quality result in record time.... thanks for considering my proposal, do not forget to visit my profile to see wha Mais

$89 USD in 4 dias
(16 Comentários)

Good day! I am relatively new on, but I am experienced programmer, I would like to do your project and receive good feedback on my work. I would write three functions that you can easily include into Mais

$55 USD in 5 dias
(2 Comentários)

Dear Sir I understand your Job and ready to give you quick and quality script I'll write the code with clear documentation I have one question: If i use sqlite, is there any problem ? as sqlite requires only a Mais

$30 USD em 1 dia
(0 Comentários)

i think you should be use the database concept to make your page more dynamic and more secure for users informaion that u get aftre sybmit the form by the user

$25 USD in 10 dias
(0 Comentários)

Hi Stefanpatatu, I have experience in building web applications. I have read your application. Due to my skills in PHP,cURL and HTML/HTML5, I am interested in your project. Please feel free to ask questions, if Mais

$155 USD in 2 dias
(0 Comentários)