mIRC Home    About    Download    Register    News    Help

Print Thread
#64781 22/12/03 10:42 AM
Joined: Aug 2003
Posts: 5
S
sala Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2003
Posts: 5
alias nforce {
/sockopen nforce nforce.nl 80
}

on *:sockopen:nforce:{
set %nforcephp /nfos/bots_last-10.php
sockwrite -n $sockname GET %nforcephp HTTP/1.0
; This is telling the socket to connect to the specific page, using "GET".
sockwrite $sockname nforce.nl $crlf
; This states the host once again.
echo -a sockopen closed
}
on *:SOCKCLOSE:nforce: {
echo -a socket closed
; BMFfarm
}

on *:sockread:nforce:{
echo -a helppppppppppppppppp
if ($sockerr > 0) return
:nextread
sockread %nforcenl
echo -a %nforcenl
; read the data coming from the socket
if ($sockbr == 0) return
; if i've read all the data, stop
if (%temp) { echo %nforcenl }
; if there was stuff received from the socket, then echo it
goto nextread
}


Why doesnt he anything in the sockread part ?
echo -a helppppppppppppppppp

#64782 22/12/03 11:17 AM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
* Dns resolving nforce.nl
* Dns resolved nforce.nl to 62.212.84.201

* Dns resolving www.nforce.nl
* Dns resolved www.nforce.nl to 62.212.84.63

maybe you want www.nforce.nl ?

There is nothing wrong with the sockread part, but when you send the GET stuff to the server you need to send
Code:
  sockwrite -n $sockname GET /nfos/bots_last-10.php HTTP/1.0
  sockwrite $sockname Host: www.nforce.nl $str($crlf,2)

note the Host: part and the double carrage return line feed,
i used $str($crlf,2) for that.

#64783 22/12/03 11:25 AM
Joined: Dec 2002
Posts: 124
B
Vogon poet
Offline
Vogon poet
B
Joined: Dec 2002
Posts: 124
alias nforce sockopen nforce www.nforce.nl 80

on *:sockopen:nforce:{
if !$sockerr {
var %s = sockwrite -n $sockname
%s GET /nfos/bots_last-10.php HTTP/1.0
%s Host: www.nforce.nl
%s $crlf
}
}
on *:sockread:nforce:{
var %r
:nextread
sockread %r
if !$sockerr && $sockbr {
if (%r) echo -a %r
goto nextread
}
}HTTP/1.1 200 OK
Date: Mon, 22 Dec 2003 11:27:17 GMT
Server: Apache/2.0.47 (Unix) PHP/4.3.3
X-Powered-By: PHP/4.3.3
Connection: close
Content-Type: text/html; charset=ISO-8859-1




Link Copied to Clipboard