fopen on URL which requires POST-vars
| From: | (Arve Bersvendsen) | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | fopen on URL which requires POST-vars | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-21360@lists.php.net to get a copy of this message | ||
In writing a simple robot that works only on user requests which
fetches, parses and returns result to the user in text/plain format,
I've written a script which fetches an URL using fopen($url,"r").
The basic URL i request, and retrieve is on the form
http://address/document.asp?item1=foo&item2=bar
Getting the data I want in the get-request is no problem, but there
is a form on the page, which will send additional data to the server
<form name="foobar" method="post">
<select name="barfight" onchange="sendData(this.form)">
<option value=123>item1</option>
<option value=456>item2</option>
<option value=789>item3</option>
</select>
<input type="radio" name="hahaha" value="good">
<input type="radio" name="hahaha" value"bad">
<input type="submit" name="FetchData" Value="Fetch">
</form>
Maybe this is my lacking understandig of forms, get and post. But,
can I pass the post data, via URL, and in that case, how should the
URL be specified, or can I use http-post-vars in some way, when
opening the document URL.
--
Arve Bersvendsen.