26 (edited by Gary13579 2005-02-16 16:18)

Re: Chat

Doesnt PHP have some IRC functions?
I dont have the manual with me (at school sad), but I think that might be possible

Edit: Thank god for php.net smile

<?php

// connect to server
$id = ircg_pconnect($nickname, $ip, $port);

// set to output to a file
ircg_set_file($id, 'irc_output.html');

// try to join a channel
if (!ircg_join($id, $channel)) {
   echo "Cannot /join $channel<br />";
}

// send list command
ircg_list($id, $channel);

// wait for output to arrive
sleep(5);

// disconnect
ircg_disconnect($id,'Bye World');

// output everything
readfile('irc_output.html');

?>

Returns something like this in irc_output.html

...
Channel #channel has n users and the topic is 'Topic'
End of LIST
...

This would work, if you use it right. Otherwise you have to wait 5 seconds for every page load...

Indocron
$theQuestion = (2*b) || !(2*b);

Re: Chat

Remember, to use these functions one must compile ircg support into PHP.

i can't use that

Re: Chat

I should have known that..
Is there any way to moniter idle time, and use that to determine if someone is on the chat?

Indocron
$theQuestion = (2*b) || !(2*b);

Re: Chat

for example on http://www.fantasya.org.

sorry its in french, and i don't know how they do. Like other site they allow you to register your own irc channel and give you a platform in java to use it.

they give you a script

<script language="javascript" src="http://www.fantasya.org/compteurs/compteur.php?salon=fnd"></script>

than give you the number of visitor in your channel...

register is very simple, perhaps you can try...

Re: Chat

but i don't know what the php behind it is

Re: Chat

Gary13579 wrote:

I should have known that..
Is there any way to moniter idle time, and use that to determine if someone is on the chat?

no because how do you know someone is idleing rather than has closed the window?,

hmm the pjirc for phpbb lists users i think i'll have a look

edit: it uses Blitzed.org scripts to do it so thats not really possible either

Re: Chat

Connorhd wrote:

but i don't know what the php behind it is

Me too ! i know that that is the question, but it's just to say it's possible if they already do it tongue

Re: Chat

they might use what gary said, or if their php is on the same server as the ircd its easy

Re: Chat

Connorhd wrote:

they might use what gary said, or if their php is on the same server as the ircd its easy

oups roll