PDA

View Full Version : include


Lionel
01-25-2002, 01:43 AM
Is is possible to include a page.html from another server into a template? I believe I saw codes like that somewhere.

Lionel
01-25-2002, 02:06 AM
I am trying to grab the count on my chat server which is different from vb. the page.html consists of just one line without any <html> or <body> tags and reads the user count well.

Now in my vb template, I placed that code in:

<?
$fd= fread(fopen("http://chat.server.com/login/count.html", "r"), 100000);
if ($fd)
echo $code;
?>

what is happening, the two instances of $fd are ignored and are not even included in the view source of the page.

Is there a place (in global.php for example) that I should place the above without <? ?>, call it $chat and display $chat in template?

If so, then how do I define $chat= since $fd already = ?

Lionel
01-25-2002, 02:13 AM
I did it, and it works. But placing this in global.php slows things a lot, since at every instance global has to go somewhere to open a file and to read it.

where else could I place it so just that one template could read the info?