How can I send POST data to a URL in PHP (without a form)?
I’m going to use it for sending a variable to complete and submit a form.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
If you’re looking to post data to a URL from PHP code itself (without using an html form) it can be done with curl. It will look like this:
This will send the post variables to the specified url, and what the page returns will be in $response.