Reputation: 26581
Does anyone know how I can fill in and submit a form which is hosted on a separate server. Say for example, I wanted to fill the form out on http://tools.950buy.com/rss-submit/ but I wanted to do this from a PHP script on my site. Would this be possible? Thanks. :)
Upvotes: 0
Views: 115
Reputation: 3854
To do it from PHP script you should simulate a HTTP POST request. You can do that by using Client URL library or file_put_contents()
function with properly set up $context
parameter:
$opts = array(
'http'=>array(
'method' => 'POST'
)
);
$context = stream_context_create($opts);
Upvotes: 2