Re: Include a web page in a variable

From: Date: Tue, 09 Jan 2001 00:24:29 +0000
Subject: Re: Include a web page in a variable
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-33357@lists.php.net to get a copy of this message
I believe $var=file(http://slashdot.org); should do it, if not then use fopen() and fread(), as these can access web pages. Gfunk My name was Brian McGee, I stayed up listening to Queen, When I was seventeen. http://www.gfunk007.com/ ----- Original Message ----- From: "Nicklas af Ekenstam" <n@nille.org> To: <php-general@lists.php.net> Sent: Tuesday, January 09, 2001 11:19 AM Subject: [PHP] Include a web page in a variable > Hi, > > Propably a really easy and lame question but I'll shoot anyhow: > What's the easiest and cleanest way to include the contents of a webpage > into a variable? > Kinda like this but with the actuall content of the web page in the var > except for the staus code or doc size or whatever this results in. > > $html = include("http://www.slashdot.org/"); > > Thanks! > > Nicklas > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#33357) next »