I am posting under Newbie because there is not a forum labelled "flailing dabbler"

I dabble always keeping an undabbled backup 🙂

I have added Chatblazer to my site and they have a script for "Who is Chatting"

the script is below. If I take the http address and just insert it as a URL into a browser it comes back with "0" and who is online. If I take the URL below and insert it into an Iframe it returns exactly what I want which is the users that are online. However, that URL has my password and Chatblazer number in it which when using "View Source in the URL that is presenting the "Who is on Line" one can read both Password and CHatblazer number.

So I know I have to call this script from my page. I have the script in a who.php file and want to call if from another page. My problem is I don't know how to call it and get it to return who is online. If I just put the who.php URL into the iframe it returns the script contents and does not execute the script...which I am sure you know.

This is the section of my Bulletin board I hope to insert what I "perceive" to be the need for a call to the script

#index_who_is_online
!table_header($table_width='98%', $table_title='%who_is_online')
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="0" BORDER="0">
<TR>
<TD>$board_stats<BR>%newest_user<BR><BR>$online_user_list</TD>
</TR>
</TABLE>
!table_footer
!table_header($table_width='98%', $table_title='Who's on Chat')
<TABLE WIDTH="100%" CELLPADDING="5" CELLSPACING="0" BORDER="0">
<TR>
<TD>I have to insert the call here for it to display in this spot, all the users online
</TR>
</TABLE>
!table_footer

Here is the script that I have in who.php

// store users online in this array
$users = array();
// call the script
$fp = fopen("http://host3.chatblazer.com/queryonline.php?site=CBSXX&user=CBSXXadmin&passwd=XXXXX", "r");
if ($fp) {
// read the code
$code = fgets($fp);
if ($code == '0') {
$line = fgets($fp);
while ($line) {
$ay = explode("\t", $line);
// user in 0th, room in 1st index
$users[] = $ay[0];
$line = fgets($fp);
}
}
else {
// handle error here
}
}
else {
// script failed to open
}

Anyone wish to help a "flailing dabbler"? Thanks in advance for any help.

    Write a Reply...