Page 1 of 1

Getting HTML from a remote site

Posted: Tue Oct 25, 2005 3:39 am
by Ree
Is there a way to simulate user request of a remote page (on another server) and get the contents of the output? To make it more clear: normally some user submits a form on somesite.com and as a result gets the HTML output on that site. I want to do this: some user submits a form on mysite.com (which is actually submitted to somesite.com) and I want to modify the HTML output generated by somesite.com (the HTML should be identical to that outputted if the user submitted the form on somesite.com itself) and display it on mysite.com. Is there a way to do this kind of stuff?

Posted: Tue Oct 25, 2005 3:42 am
by Jenk
I've not used it myself, but it sounds like you need to use the wonders of the cURL library :)

Posted: Tue Oct 25, 2005 12:16 pm
by Ree
Yeah, that's exatctly what I need. VERY nice thingy. :)

Posted: Tue Oct 25, 2005 1:44 pm
by foobar
You can alternately use fopen and the rest of the lot. That only works if you have necessary access rights to the file.

Posted: Wed Oct 26, 2005 4:40 am
by n00b Saibot
Jenk wrote:I've not used it myself
Why, didn't you get time...? its pretty easy and sometimes very handy too. jus' asking :)