Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reading remote file with POST method

Status
Not open for further replies.

denoxis

Programmer
Jul 22, 2002
154
US
Hi everybody,

I'm working on a solution that should include some remote files from another URL. This solution will be platform independent, and I already know how to do it with ASP.

Using PHP, I can dump the result of the remote script with the functions like include() or fopen(). What I want to do is, sometimes I need to use the POST method instead of GET.

Is there any way to call a URL using post method with the specified parameters (form fields) in PHP so that the output would be the result of this post? Here is the ASP example of it that describes what I mean clearly:

xml.Open "POST", "xml.Send "productID=123&action=view" 'Form fields to be posted

Response.Write xml.responseText 'Display the result

I need the PHP version of it. Thanks a lot.

- Deniz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top