mIRC Home    About    Download    Register    News    Help

Print Thread
sockopen .php(s) #145522 23/03/06 08:58 PM
Joined: Mar 2006
Posts: 5
I
igotnonick Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Mar 2006
Posts: 5
Hi ppl.
i can't logon the site and retrive data?
did i did anything wrong?

Code:
alias sq sockopen sq www.thesimpsonsquotes.com 80
on *:sockopen:sq:{
  sockwrite -n $sockname GET /random.php?num=1 HTTP/1.1
  sockwrite -n $sockname Host: thesimpsonsquotes.com $+ $str($crlf,2)
}
on *:sockread:sq:{
  sockread %data
  echo -s %data
}

Re: sockopen .php(s) #145523 23/03/06 09:26 PM
Joined: May 2005
Posts: 449
bwr30060 Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Quote:

HTTP/1.1 301 Moved Permanently
Date: Thu, 23 Mar 2006 21:25:22 GMT
Server: Apache/2.0.46 (Red Hat)
Location: http://www.thesimpsonsquotes.com/random.php?num=1
Content-Length: 347
Connection: close
Content-Type: text/html; charset=iso-8859-1

Re: sockopen .php(s) #145524 24/03/06 12:20 PM
Joined: Mar 2006
Posts: 5
I
igotnonick Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Mar 2006
Posts: 5
HTTP/1.1 301 Moved Permanently
Date: Fri, 24 Mar 2006 12:19:37 GMT
Content-Length: 347
Content-Type: text/html; charset=iso-8859-1
Server: Apache/2.0.46 (Red Hat)
Location: http://www.thesimpsonsquotes.com/random.php?num=1
Via: 1.1 supercache2 (NetCache NetApp/6.0.2)
-
* /echo: insufficient parameters (line 81, script21.ini)
-
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.thesimpsonsquotes.com/random.php?num=1">here</a>.</p>
<hr />
<address>Apache/2.0.46 (Red Hat) Server at thesimpsonsquotes.com Port 80</address>
</body></html>

Re: sockopen .php(s) #145525 24/03/06 12:26 PM
Joined: Feb 2004
Posts: 2,019
FiberOPtics Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
sockwrite -n $sockname Host: www.thesimpsonsquotes.com $+ $str($crlf,2)


Gone.
Re: sockopen .php(s) #145526 24/03/06 02:05 PM
Joined: Mar 2006
Posts: 5
I
igotnonick Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
I
Joined: Mar 2006
Posts: 5
special thanks fop. i missed this crazy

Re: sockopen .php(s) #145527 25/03/06 08:29 AM
Joined: Nov 2004
Posts: 148
D
Dr_Brom_sung_ Offline
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
also change the:
echo -s %data

to

if ($remove(%data,$chr(32)) != $null) echo -s %data


This way you will not create an error!!!
(You can also just put :error after the echo command so you will just not see the error and it will not halt the script, assuming that you will add more lines after the echo)