Re: Manually make a POST request?
- From: Curtis <dyer85@xxxxxxxxxxx>
- Date: Thu, 30 Oct 2008 00:18:02 GMT
703designs wrote:
On Oct 29, 2:40 pm, FutureShock <futuresho...@xxxxxxx> wrote:(Top-posting fixed.)703designs wrote:Unless Curl isn't installed, of course. On most servers, this is fine,I'm writing a little Drupal module that implements a couple forms,I am not 100% on this but I think it can be accomplished with 'curl'.
relaying the submitted values to a third-party site. I know the target
URL and I have all of the values that I want to submit with the POST
request, so how can I invoke this request directly from a PHP script?
http://us2.php.net/curl
Let me know if that works for you.
but I'm stuck developing on a Windows box right now. I'm tinkering
with socket functions, and I could always use this utility function:
http://www.jonasjohn.de/snippets/php/post-request.htm
cURL works just as well on Windows. However, you should not need it unless you need to things like accept cookies or, perhaps, deal with SSL.
You should be able to use fsockopen(), otherwise. Using google, you can figure out how to send a POST request. The HTTP RFC, for example might help.
<URL:http://php.net/fsockopen>
P.S.: most people prefer bottom-posting.
--
Curtis
$eMail = str_replace('sig.invalid', 'gmail.com', $from);
.
- References:
- Re: Manually make a POST request?
- From: FutureShock
- Re: Manually make a POST request?
- Prev by Date: bollhy"system" function output displays twice last line
- Next by Date: Re: Manually make a POST request?
- Previous by thread: Re: Manually make a POST request?
- Next by thread: Re: Manually make a POST request?
- Index(es):
Relevant Pages
|