Forum Moderators: coopster & phranque

Message Too Old, No Replies

Is there a way to 'capture' the entire HTTP output of another site?

         

irock

6:00 pm on Feb 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a way to 'capture' the entire HTTP output of another site?

Could this be done with a few lines of codes?

Thanks!

andreasfriedrich

6:40 pm on Feb 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



fsockopen() [php.net] will open a connection to a certain host. You can then use fputs() [php.net] and fgets() [php.net] to talk to and read from that host. You´ll need to talk HTTP and it will talk back to you using HTTP as well.

Code examples are available on WebmasterWorld or the fsockopen() [php.net] manual page.

Andreas

seindal

7:39 pm on Feb 12, 2003 (gmt 0)

10+ Year Member



I usually use "wget -d -U 'whatever user-agent you want' URL"
to see all the request and response headers.

René.

beit company

3:07 am on Feb 13, 2003 (gmt 0)

10+ Year Member



CURL functions can help too.

crypto

3:21 am on Feb 13, 2003 (gmt 0)

10+ Year Member



This is how you can capture an HTTP output:

$html = implode ('', file ('http://domain.com/<file>'));