Forum Moderators: coopster

Message Too Old, No Replies

How to get the HTML source of any page?

is there any function to get the HTML source of any page.

         

manoj badola

4:19 am on Apr 11, 2004 (gmt 0)

10+ Year Member



U want to catch the HTML source of the web page but I can't get this by file_get_contents().Us there any function to do that, or any method for doing that.

mep00

10:16 am on Apr 11, 2004 (gmt 0)

10+ Year Member



Yes: output buffering.

Off hand, I don't know how to use it (never needed it), but you could check at php.net [php.net].

You can also do this manually by directing all intended output to a variable and the echoing it.

jetboy_70

10:50 am on Apr 11, 2004 (gmt 0)

10+ Year Member



[uk.php.net...]

PHP's CURL functions will do what you want. Initiate a CURL session, grab a URL, assign it to a variable.