Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6083549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:24:56+00:00 2026-05-23T11:24:56+00:00

I have a PHP service called addItem. This service is called when someone submit

  • 0

I have a PHP service called addItem.
This service is called when someone submit a form on the client side.

How can I secure that to make sure that an item will only be added when called from the intended form?
Trying to prevent someone from submitting stuff through automated curl call for example.

Thank you,
Tee

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:24:57+00:00Added an answer on May 23, 2026 at 11:24 am

    Short answer is that you can’t. As long as the form is accessible, any method you use to secure the form can be tackled in an automated way. You should never count on data sent by the user to be secure. However, there are a few things you can do to make things more challenging for anyone wanting to spoof your form.

    • Add a CAPTCHA which will probably filter out nearly all scripted submission, but also have the greatest negative impact on regular users.
    • Employ some form of CSRF protection (which you should have anyway). This will mean that anyone wanting to submit data via the form must request the form first. If this form is only accessible behind a login wall, this will make things quite challenging.
    • If you already require your users to have Javascript, try using JS when setting up a key for CSRF protection. This means that the JS must be parsed or executed in order to submit a valid form.
    • Filter common user agents such as cURL and wget.
    • Check that the form was sent via POST and not GET.
    • Add rate limiting on the server to throttle submissions to a reasonable level.
    • Check the HTTP referrer. Easily faked, but one more hoop to jump through.

    Ultimately, if someone wants to submit data to your form through some other means, it’s still ALWAYS possible. The above steps can make it more challenging, but any action that can be taken by the user can always be scripted, so make sure to have appropriate validation on the server side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP script that grabs data from an external service and saves
I have a web service, defined(WSDL) and implemented in PHP. This one is relatively
I have PHP scrip that goes like this: if ($cost_frm < $cost){ echo <script
So I have a PHP Soap service that is running nusoap and I am
I have a php webservice which can be called (from mobile phones) to perform
I have a PHP Web application that consumes a Web Service using PHP's native
I have a web service written in PHP, that returns JSON results. It works
I am trying to include the Zend_Service_Amazon_S3 file by using require_once 'Zend/Service/Amazon/S3.php'; I have
I have found some libraries or web services in PHP that does the job.
I have PHP configured so that magic quotes are on and register globals are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.