Another link problem

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

cooldownguy86
New php-forum User
New php-forum User
Posts: 4
Joined: Wed Nov 20, 2002 2:59 pm
Contact:

Another link problem

Postby cooldownguy86 » Sat Nov 23, 2002 9:18 pm

Hi again, all php pro.

I wanna ask, how to open another webpage, such as http://www.yahoo.com
i can't do it as include "http://www.yahoo.com";
please help

User avatar
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby Oleg Butuzov » Sun Nov 24, 2002 3:34 am

Code: Select all

$yahoo=fopen ("http://yahoo.com", "r");
$content=fgets($yahoo, 1200000000);
fclose($file);

echo $content;

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: Another link problem

Postby WiZARD » Sun Nov 24, 2002 3:46 am

cooldownguy86 wrote:Hi again, all php pro.

I wanna ask, how to open another webpage, such as http://www.yahoo.com
i can't do it as include "http://www.yahoo.com";
please help

Hi!
function include[b] to harmful with quotes. To you need be carefuly in next time.
I'm too sometime have a problem with this function...
Try this code:

Code: Select all

include 'http://www.yahoo.com';


My problem was next:
i give to variable [b]$lang
path to including file, and cannot including in php script. All be a very simply need do next:

Code: Select all

include $lang;


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron