We can send the POST request in PHP by using the functions like http_build_query() , stream_context_create() and file_get_contents() functions without using the CURL. We can use the http_build_query() function to create query parameters to send in the POST request.
PHP GET request php $name = $_GET['name']; if ($name == null) { $name = 'guest'; } $message = $_GET['message']; if ($message == null) { $message = 'hello there'; } echo "$name says: $message"; The example retrieves the name and message parameters from the $_GET variable. We start the server.
I'm setting up a custom e-commerce solution, and the payment system I'm using requires me to send HTTPS POSTS.
How can I do this using php (and CURL?), is it any different from sending http posts?
UPDATE:
Thanks for your replies, they've been very useful. I assume I will need to purchase an SSL certificate for this to work, and I will obviously do this for the final site, but is there any way for me to test this without buying one?
Thanks, Nico
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With