Find Jobs
Hire Freelancers

php update my web form HONEY POT + CSRF TOKEN -- 2

$10-30 AUD

In Progress
Posted over 2 years ago

$10-30 AUD

Paid on delivery
I have a simple web form and would like some one to implement the below HONEY POT + CSRF TOKEN simple instructions are below on how to add the 2 things this should take less than a hour to update, I will provide zip files or cpanel. Quote under $50 thank you, mention "HG" in comments or your bid will be ignored 1 ======================================= HONEY POT This method relies on the assumption that SPAM software doesn't recognize CSS and/or JavaScript. The "honey pot" technique use a non-visible field to fool the less-intelligent robots whos automatically fills out all the input fields prior to submit the form data for further processing. <form action="[login to view URL]" method="post"> <p> <label>Name</label> <input type="text" name="your_name"> </p> <p> <label>Email</label> <input type="email" name="your_email"> </p> <p class="fax"> <label>Fax</label> <input type="text" name="your_fax"> </p> <p> <label>Comment</label> <textarea name="your_comment"></textarea> </p> <p> <button type="submit">Submit</button> </p> </form> Then use CSS to hide the "honey pot" from your form so visitors are not able to see and fill it. <style> .fax { display: none; } </style> You can also use JavaScript to assure yourself this input field will not harm your form. <script> [login to view URL]('.fax').[login to view URL] = 'none'; </script> So, if visitors can't see and fill the non-visible input fields we can consider that the form submission with not empty fax is spam. <?php // [login to view URL] if (!empty($_POST['fax'])) { // It's SPAM } ?> ============================================== 2 ============================================== CSRF TOKEN Synchronizer token pattern uses a unique token that is embedded into the HTML forms and verified on the server side. The CSRF token should be a random value that is hard to predict, preferably generated by a cryptographical algorithm. This is how to build a CSRF token: <?php // PHP 7 $token = bin2hex(random_bytes(32)); // PHP 5.3 with mcrypt $token = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)); // PHP 5.3 with openssl $token = bin2hex(openssl_random_pseudo_bytes(32)); // PHP 4 $token = base64_encode(time() . sha1($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']) . md5(uniqid(rand(), true))); // Store the token into a session variable! $_SESSION['token'] = $token; ?> Then include the token into your HTML form. <form action="[login to view URL]" method="post"> <input type="hidden" name="token" value="<?php echo $token; ?>"> </form> To validate a token you must compare the form value with the session value. <?php // [login to view URL] if ($_SESSION['token'] !== $_POST['token']) { // It's SPAM } ?> ================================================= =================================================
Project ID: 32371652

About the project

14 proposals
Remote project
Active 2 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi there, I can add honeypot and csrf token protection to your form. Please let me know if we can discuss this further. Thank you
$45 AUD in 1 day
5.0 (596 reviews)
7.6
7.6
14 freelancers are bidding on average $41 AUD for this job
User Avatar
HG Honey POT Hello Sir Can i help you with the same? I am willing to start right away Please check my profile for work and experience. Regards Hardeep
$60 AUD in 1 day
5.0 (354 reviews)
7.1
7.1
User Avatar
Hi, dear employer. Thanks for posting your project and your attention, I read ur project carefully. I can carry out your task with the lowest budgets than anybody. PHP/WordPress/CI/Laravel/Python/Vue.js/Node.js/Magento/Animation/SEO/ are all my major skills I have the WP and HTML5/Mobile responsible samples and lots of logos. And i am carrying out WP task, i can also accept other task. I hope u'll be good luck. :-)
$20 AUD in 7 days
4.9 (132 reviews)
7.0
7.0
User Avatar
HG I can start right now with this Honey Pot + CSRF token :) Don't worry about my skills about this project. ---Fast work, High quality, The Best result.--- These are my slogans and my main goal is to satisfy client. ✦Can we have quick chat right now so that we can discuss the project briefly?✦ Please give me a chance to work as your on-going partner! Best Regards. Sergey B.
$50 AUD in 1 day
5.0 (36 reviews)
5.9
5.9
User Avatar
This surely is an easy task, moreover the instruction is clearly provided. The real question is how many forms should be updated with this honey pot & CSRF protection. I assume updating one form will take no more than 5 mins.
$30 AUD in 1 day
5.0 (75 reviews)
4.9
4.9
User Avatar
"HG" Let me do this with in a few hours. Php is very easy for me to do. I am a senior full-stack engineer over 7 years. Thanks
$50 AUD in 1 day
5.0 (12 reviews)
4.0
4.0
User Avatar
"HG" I can start now and have prior experience on it. If you didn't select someone, you can knock me for more discuss. Best Regards TAJMUL13
$45 AUD in 1 day
4.9 (19 reviews)
4.0
4.0
User Avatar
Hello, "HG" I have read your project description. I am an experienced web developer and I can work according to your requirements. I have 4+ years of experience with PHP, MySQL, HTML, CSS, JavaScript. I am available to start quick work on your project & assure you to provide highly performable clean code within the preferred timeline. Looking for your reply to start this work immediately. Thank You. Best Regards. Jafar TL (SE).
$30 AUD in 1 day
5.0 (10 reviews)
3.9
3.9
User Avatar
Hello, My name is Croitoru. I am PHP expert. I can help you perfeclty. Please contact me discuss more details. Thanks
$50 AUD in 1 day
5.0 (2 reviews)
2.2
2.2
User Avatar
"HG" Hello, I can complete it within 1 hrs. I know how to add it. If you feel that my abilities are lacking even in the slightest while carrying out the project, you may reject me and don't pay. It will be enough for an hour to confrim whether I can do it or not. I will never let you down and I will always make you smile. Kind regards.
$40 AUD in 1 day
4.9 (2 reviews)
2.3
2.3

About the client

Flag of AUSTRALIA
Newport, Australia
5.0
422
Payment method verified
Member since Oct 18, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.