mIRC Home    About    Download    Register    News    Help

Topic Options
#55916 - 18/10/03 10:05 PM Is there a way of doing this?
Gar Offline
Vogon poet

Registered: 11/09/03
Posts: 122
Does anybody know perhaps of a script, which can read and display the amount of people, which are currently in an IRC room, and place that number on a website.

Is this possible?
_________________________
My Website

Top
#55917 - 18/10/03 10:10 PM Re: Is there a way of doing this?
pleur Offline
Ameglian cow

Registered: 16/10/03
Posts: 30
Loc: Netherlands, The
yeah sure, but you should write an upload-script to update the site, and I think's that's difficult

you should better open a socket (to listening), and use that instead of the page

example: [url removed by PleuR]


Edited by pleur (18/10/03 10:19 PM)
_________________________
------
Cheers m8!

Top
#55918 - 18/10/03 10:15 PM Re: Is there a way of doing this?
Gar Offline
Vogon poet

Registered: 11/09/03
Posts: 122
all I am looking for is a script that says something like:

There is 3 members on the #Santharia channel

What you should me is a little too much.

_________________________
My Website

Top
#55919 - 18/10/03 10:15 PM Re: Is there a way of doing this?
Gar Offline
Vogon poet

Registered: 11/09/03
Posts: 122
or just

There is 3 members on the channel
_________________________
My Website

Top
#55920 - 18/10/03 10:19 PM Re: Is there a way of doing this?
pleur Offline
Ameglian cow

Registered: 16/10/03
Posts: 30
Loc: Netherlands, The
i'm sorry, I mis understood you


//echo There are $nick(#channel,0) ppl on the channel
//echo There are $nick(#channel,0,o) ops on the channel
//echo The first voice on the channel is $nick(#channel,1,v)
see /help $nick for more info
_________________________
------
Cheers m8!

Top
#55921 - 18/10/03 10:21 PM Re: Is there a way of doing this?
Gar Offline
Vogon poet

Registered: 11/09/03
Posts: 122
but I need to have that text shown on a website.

I think I confused you....sorry
_________________________
My Website

Top
#55922 - 18/10/03 10:23 PM Re: Is there a way of doing this?
pleur Offline
Ameglian cow

Registered: 16/10/03
Posts: 30
Loc: Netherlands, The
Hehe, i see


To do that, you have to edit the page, this must be done with Sockets, and requiers some scripting skills...
But if you think you can do it, and you can access your site with FTP, you have to learn sockets and the FTP protocol to edit the page
_________________________
------
Cheers m8!

Top
#55923 - 18/10/03 10:25 PM Re: Is there a way of doing this?
Gar Offline
Vogon poet

Registered: 11/09/03
Posts: 122
Is there a place I could learn about this stuff?
_________________________
My Website

Top
#55924 - 18/10/03 10:27 PM Re: Is there a way of doing this?
Aazn Offline
Nutrimatic drinks dispenser

Registered: 03/10/03
Posts: 8
You dont seem to understand. His question is

Quote:

Does anybody know perhaps of a script, which can read and display the amount of people, which are currently in an IRC room, and place that number on a website.


Notice that he wants to post it to a WEBPAGE, not on mIRC.

He probably wants a perl script that opens a mirc socket, listens, counts the users, and disconnects. I personally cant script in perl, and I dont want to learn so I suggest that you find some perl documents. Here, I'll give you a headstart in the Research:

Perl CGI

Perl Bots

Perl stats generator

How to connect to IRC through Perl

Simple Perl Bot

There. I've done some of the legwork for you, you need to read them. I think that going to perl is the best way possible at the moment, unless your better at VB/C++.

- Aazn
_________________________
( www.nnscript.de )

Top
#55925 - 18/10/03 10:29 PM Re: Is there a way of doing this?
Gar Offline
Vogon poet

Registered: 11/09/03
Posts: 122
I might not of been as clear as I coulda been. Just got off work and its late here

Thanks though. I will read up on the info.
_________________________
My Website

Top
#55926 - 18/10/03 10:54 PM Re: Is there a way of doing this?
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
You don't have to mess up with sockets for that, there's a clean way of uploading your file through FTP to your webpage. See this tutorial for details laugh

Top
#55927 - 19/10/03 09:02 AM Re: Is there a way of doing this?
Gar Offline
Vogon poet

Registered: 11/09/03
Posts: 122
okay well I got some rest and think I am going to try this again.

What I am looking for is this:

I have a website, this website has its own channel. What I would like is some kinda Javascript or something, that will create the following text:

There is currently [color:blue]3 people on the channel.[/color]

This line of text will be found on a website, not on IRC. It will update itself when ever someone joins the room or leaves. Thus the blue number may increase to 4 when a person joins, or reduce to 2 when a person leaves.

I don't need it to be a live script, constantly changing. Just need it to look into the channel when the page is loaded, get the number of people in the channel, then report it. Doing this each time the page is reloaded.

* Gar wonders if he made himself any clearer.
_________________________
My Website

Top
#55928 - 19/10/03 12:46 PM Re: Is there a way of doing this?
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
I understand what you are trying to do, and I think the best way would be running a timer that will periodically (every 5-15 mins) write the current usercount along with some HTML stuff into a file, and upload it to the website.

If you wanted to update the usercount whenever someone is viewing your page that would involve a lot of server-side programming (even running a separate clone for that, like the Online /whois service does) as well as delay that will likely annoy the visitors, and I honestly don't think it's not worth it.

Top
#55929 - 19/10/03 04:40 PM Re: Is there a way of doing this?
Tsunami Offline
Babel fish

Registered: 17/10/03
Posts: 50
Loc: The Netherlands
I think he doesn't want to run a script for mIRC to do it, but something like he said, a JavaScript thingy that will look for the usercount...
_________________________
Tsunami Productions

Top
#55930 - 19/10/03 05:11 PM Re: Is there a way of doing this?
Aazn Offline
Nutrimatic drinks dispenser

Registered: 03/10/03
Posts: 8
I dont think he wants mirc to do it, I think he wants PERL or JavaScript to look at the channel and say 'We have XX users in #EEE'. It would be easy doing it from mIRC, but what if his computer crashes.

He wants it to update on the website, so that he doesn't have to look at the sockets opening. It would be hard, but you can do it through perl. I know that. Perl is used for alot of chats, but PHP might work also.

I'd reccomend looking into PHP also.

- Aazn
_________________________
( www.nnscript.de )

Top
#55931 - 19/10/03 07:08 PM Re: Is there a way of doing this?
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
I can't help much then crazy

It would help if somebody already published such a PHP/Perl bot with some documentation.

Top
#55932 - 20/10/03 12:13 AM Re: Is there a way of doing this?
Gar Offline
Vogon poet

Registered: 11/09/03
Posts: 122
yep, you get it now...but sadly can't help me frown
_________________________
My Website

Top
#55933 - 20/10/03 06:09 AM Re: Is there a way of doing this?
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
Unless you write a script (php, perl, etc) that connects to the server, joins ur channel, does a names lisitng and counts the users, and disconnected every time auser visits the page--its wont happen. The only other alternative is you, yourself, run a timer that sends a query to a page updating user count. Such as php could do:

www.somepage.com/users.php?count=<number>

And use sockets to connect and update the webpage via users.php
_________________________
-KingTomato

Top
#55934 - 26/10/03 03:02 AM Re: Is there a way of doing this?
archfiend Offline
Nutrimatic drinks dispenser

Registered: 16/07/03
Posts: 6
As long as your channel is being indexed by SearchIRC, there is a built in feature from SearchIRC that allows you to do exactly that.

Please look at request channel stats


Edited by archfiend (26/10/03 03:05 AM)

Top