Register Nick From web portal
Moderator: Supporters
Register Nick From web portal
I'm sorry but i can't use Awesome ...
I'm read and change the config file.. Whit localhost for ip of the server
But when i'm logon i didn't say anything ...
I would like to register nick from a web portal and I can use php ..
I use socket but i can't how to use it ....
Someone have a example please ??
I woul like to do this alone .. but i need help..
I'm read and change the config file.. Whit localhost for ip of the server
But when i'm logon i didn't say anything ...
I would like to register nick from a web portal and I can use php ..
I use socket but i can't how to use it ....
Someone have a example please ??
I woul like to do this alone .. but i need help..
I'm come back home...
And this is my code :
But the only response i have is that :
Thanks a lot
And this is my code :
Code: Select all
<?php
$ip = "localhost";
$port = "6667";
$nickname = "Number_?";
$channel = "#Bienvenue";
$fp = fsockopen("$ip", $port, $errno, $errstr);
$fget = fgets($fp);
echo "$fget <br />";
$fputs = fputs($fp, "USER 'TEST' 'TEST'@'localhost' :TEST");
$fgets = fgets($fp);
echo "$fgets <br />";
$fput = fputs($fp,"NICK TEST");
$fg = fgets($fp);
echo "$fg <br />";
?>
What can i do ? to be logon and have the motd whit socket in php ??:irc.number.no-ip.org NOTICE AUTH :*** Looking up your hostname...
:irc.number.no-ip.org NOTICE AUTH :*** Found your hostname
Thanks a lot
Ugh. Try introducing at least a general loop checking the eof state of the socket.
You'll also need to handle IRC commands such as PING, etc etc etc etc.
Hint: Research the following PHP stuff: while loops, feof, fclose.
You'll also need to handle IRC commands such as PING, etc etc etc etc.
Hint: Research the following PHP stuff: while loops, feof, fclose.
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
Thanks ... Now it run ...
But i have a another problem...
See this :
I don't need to be register to do /STATS u...
Why ???
Thanks for your help w00t
But i have a another problem...
See this :
What does it mean : "451 STATS: You have not registered"connect to localhost...
Ident...
:irc.number.no-ip.org NOTICE AUTH :*** Looking up your hostname...
:irc.number.no-ip.org NOTICE AUTH :*** Found your hostname
:irc.number.no-ip.org NOTICE Test :*** If you are having problems connecting due to ping timeouts, please type /quote pong 70EFC0C3 or /raw pong 70EFC0C3 now.
PING :70EFC0C3
PONG !
:irc.number.no-ip.org 451 STATS :You have not registered
ERROR :Closing Link: Test[127.0.0.1] (Ping timeout)
I don't need to be register to do /STATS u...
Why ???
Code: Select all
$fp=fsockopen("$serv","6667");
fputs($fp, "USER Test localhost localhost :register\r\n");
fputs($fp,"NICK Test\r\n");
sleep(1);
fputs($fp,"STATS u\r\n");
while ($line = fgets($fp,1024)) {
$a = explode(" ", $line);
echo "$line <br />";
if ($a[0] == "PING") {
fputs($sock, "PONG $a[1]");
echo "PONG ! <br />";
}
}Try waiting for an "001" response in a[1] and sending the STATS request then.
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
fputs($sock, "PONG $a[1]");
echo that back EXACTLY so we cna see what you're sending.
echo that back EXACTLY so we cna see what you're sending.
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
i Know that ...
Echo Print what the server send by the socket ...
And for each thing the web page receive i use echo to see it ...
If i receive PING - 1234567
I send (now ) PONG- 1234567
But i have this :
I send USER
I Send NICK
I wait 10 ''
I Respond to PONG if server send PING ..
And I Send STATS ...
Echo Print what the server send by the socket ...
And for each thing the web page receive i use echo to see it ...
If i receive PING - 1234567
I send (now ) PONG- 1234567
But i have this :
In php :=>USER Test localhost localhost :register
=>NICK Test
<= :irc.number.no-ip.org NOTICE AUTH :*** Looking up your hostname...
<= :irc.number.no-ip.org NOTICE AUTH :*** Found your hostname
<= :irc.number.no-ip.org NOTICE Test :*** If you are having problems connecting due to ping timeouts, please type /quote pong 6D4CBA32 or /raw pong 6D4CBA32 now.
<= PING :6D4CBA32
=> PONG :6D4CBA32
<= :irc.number.no-ip.org 451 STATS :You have not registered
<= ERROR :Closing Link: Test[127.0.0.1] (Ping timeout)
I send USER
I Send NICK
I wait 10 ''
I Respond to PONG if server send PING ..
And I Send STATS ...
-
codemastr
- Former UnrealIRCd head coder
- Posts: 811
- Joined: Sat Mar 06, 2004 8:47 pm
- Location: United States
- Contact:
Doesn't PHP come with a basic set of IRC functions? http://docs.php.net/en/ref.ircg.html
-- codemastr
Don't wait that 10 seconds. You might be missing something, and you dont need to wait. The loop will only finish if the socket gets closed (so you'll want to send a QUIT after you recieve RPL_ENDOFSTATS or whatever
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
It's not with php ..codemastr wrote:Doesn't PHP come with a basic set of IRC functions? http://docs.php.net/en/ref.ircg.html
You can't compile php with ircg ..
You need to install it after ...
I don't want to use ircg because my website must to be "portabl" ..
w00t ..
I deleted the "sleep(10)" but i have the same ...
You can test whit me ?? please ...
codemastr, the ircg library also gave me quite a few headaches when i tried it :p (php/apache crashes, etc)
Number: Not today sorry. it's 3:45am, and i'm having trouble just typing.
Number: Not today sorry. it's 3:45am, and i'm having trouble just typing.
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
Wow, Thanx codemastr, and i was using fsockets the entire time for some web based stuff to IRC.. Time to do some reading.codemastr wrote:Doesn't PHP come with a basic set of IRC functions? http://docs.php.net/en/ref.ircg.html