mIRC Home    About    Download    Register    News    Help

Print Thread
#6814 16/01/03 06:25 AM
Joined: Jan 2003
Posts: 8
J
jstyles Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Jan 2003
Posts: 8
I'm trying to make an http connection to pub1.ezboard.com so I can grab the page http://pub1.ezboard.com/framblinirishmanmessageboarmainmessageboard
I've done this with other hosts/sites without any problems. But on this one it doesn't seem to respond to any of the commands I give it. Usually just a simple GET request will get me something. Sending the Host and line feed after it doesn't seem to help me either.

#6815 16/01/03 07:11 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Code:
alias [color:green]socknamehere[/color] {
  sockopen [color:green]socknamehere[/color] pub1.ezboard.com 80
}
on *:SOCKOPEN:[color:green]socknamehere[/color]:{
  .remove $sockname $+ .html
  sockwrite -n $sockname GET /framblinirishmanmessageboarmainmessageboard
  sockwrite -n $sockname $crlf
}
on *:SOCKREAD:[color:green]socknamehere[/color]:{
  :nextread
  sockread %temp
  if ($sockbr == 0) return
  write $sockname $+ .html $left(%temp,500)
  write $sockname $+ .html $mid(%temp,500,1000)
  goto nextread
}


That works...the reason there are 2 write commands is that when I did one command I got "* /write: line too long (line 14, script65.mrc)" (using this way doesn't give perfect results either, but it gives better ones), hopefully someone who reads this will know a way round it if you don't smile

#6816 16/01/03 07:22 AM
Joined: Jan 2003
Posts: 8
J
jstyles Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
J
Joined: Jan 2003
Posts: 8
Wow, thanks... turned out I was used $lf instead of $crlf smile


Link Copied to Clipboard