FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Simulating a Form Method=Post submission in PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Simulating a Form Method=Post submission in PHP [message #178427 is a reply to message #178426] Sun, 17 June 2012 00:41 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 6/16/2012 8:10 PM, Robert Rosenberg wrote:
> On 06/16/2012 14:46, in article 6s0va9-ugd(dot)ln1(at)luuk(dot)invalid(dot)lan, "Luuk"
> <luuk(at)invalid(dot)lan> wrote:
>
>> On 16-06-2012 20:25, Robert Rosenberg wrote:
>>> I would like to go to an external site and send a form to it via Post
>>> (simulating having generated the form and having the user submit it). I know
>>> that if I had been using GET, I could just code the parms along with the URL
>>> in the location command. To simulate Post I assume that I just need to use
>>> header to send the POST parms but I do not know the format of what to place
>>> in the header request (and I assume that I then use location to fire off to
>>> connection).
>>>
>>> Can someone either supply me with a sample code to do this or give me the
>>> URL of the documentation of the Headers that get sent by Post so I can look
>>> them up and create the needed script myself.
>>>
>>> Thank You.
>>>
>>
>>
>> use curl (example #2)
>> see: http://www.php.net/manual/en/function.curl-setopt.php
>>
>> or file_get_contents
>> see: http://www.php.net/manual/en/function.file-get-contents.php#108309
>>
>
> Thank You.
>
> Example 2 was EXACTLY what I needed (even though all I wanted to do was pass
> a set of parms not load a file).
>
> One other query. I seem to remember a site whose function was to display all
> the headers being passed. I think it was a security type page whose purposed
> was to show all the data being leaked/sent in the headers when you connect.
> I would like to see what I ended up sending (as well as all the headers
> being sent) so I have a reference to see what the cURL function caused the
> browser to send. Cam you refresh my memory by supplying a URL for that site.
>
> Thank You.
>

You may be thinking of the HTTP Headers plugin for Firefox. A great
tool, but it doesn't help with cURL because cURL doesn't use the browser.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reading & Displaying Latex Rendered images
Next Topic: Apache and php to show http request headers.
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 20:46:37 GMT 2024

Total time taken to generate the page: 0.04014 seconds