mIRC Home    About    Download    Register    News    Help

Print Thread
#47030 04/09/03 06:17 AM
C
CyBot
CyBot
C
Hey does anyone know how i would use sockets to open up a site like http://www.site-here.com/site/page.html ?
Using /sockopen or any other replacement :tongue:

#47031 04/09/03 07:46 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534

#47032 04/09/03 07:50 AM
C
CyBot
CyBot
C
Hmmm...
I meant like viewing the source code via mirc...

#47033 04/09/03 08:03 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Code:
alias mirc { 
  sockopen mirc www.mirc.co.uk 80
}

on *:sockopen:mirc:{  
  sockwrite -n $sockname GET /cmds.html HTTP/1.1  
  sockwrite -n $sockname Accept: */*  
  sockwrite -n $sockname Host: www.mirc.co.uk  
  sockwrite -n $sockname $crlf}
}

on *:sockread:mirc: {
  sockread %html
  write cmds [ $+ [1] $+ ] $+ .txt %html
}

Sorry, you didn't say you wanted the source, try that.

#47034 05/09/03 06:59 AM
C
CyBot
CyBot
C
Thanks for that, btw do you know why at the end of the file there is a 0 (its for my pages, they're in php) ?
Danké anyways!


Link Copied to Clipboard