Re: call a website from a php script

From: Date: Sun, 16 Feb 2003 10:51:44 +0000
Subject: Re: call a website from a php script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135731@lists.php.net to get a copy of this message
At 11:40 16.02.2003, christian tischler said: --------------------[snip]-------------------- >can anybody tell me please how to "call" a website from a php script. > >meaning >if (something happens) {goto www.google.com} else {goto www.yahoo.com} --------------------[snip]-------------------- I believe you mean to redirect the browser to a website? header('Location: http://www.google.com/'); Or to "incorporate" (speak steal) the website? readfile('http://www.google.com'); Or to fetch the site to analyze it? $hf = fopen('http://www.google.com/') or die('Cannot open google'); $buffer = null; while ($chunk = fread($hf, 4096)) $buffer .= $chunk; fclose($hf); // analyze and process buffer Enjoy :) -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#135731) next »