I want to send data to an API. The data include simple variables: username, password, email, etc.
The problem is that O want to send data to this using POST method. I searched this issue on Google, and everyone is saying to go for CURL.
What is CURL? Is it a function, script, API or what?
Is there any other way to do it?
I want to send something like this:
$username, $password to www.abc.com?username=$username&password=$password
Best Regards
cURL is a library “that allows you to connect and communicate to many different types of servers with many different types of protocols”. So you can use cURL to send an HTTP POST request. Please read the PHP manual for detailed information: http://www.php.net/manual/en/book.curl.php
But cURL is not the only answer. You can use PHP Streams, or even connect to the webserver using socket functions and then generate your requests.
Personally I often use cURL because it’s very flexible and you can work with cookies easily.