Use curl in php to post to a php webpage programmatically and retrieve the result


/ Published in: PHP
Save to your folder(s)

This source code contains two files:
1) result.php is a php webpage which expects a post request and renders some static results
2) mycurl.php uses curl to post programmatically some data to the result.php and after rendering the result is being return and saved inside a php variable. We later display inside the page this result

Note that in order to execute properly you should change the url inside curl_init inside the source code

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.