Joey Morani
Joey Morani

Reputation: 26581

How to submit content on a external page?

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

Answers (2)

piotrp
piotrp

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

genesis
genesis

Reputation: 50966

<form action="http://url.to/script.php">

Upvotes: 1

Related Questions