mIRC Homepage
Posted By: ATMA F*UKING SOCKETS!!!!!!!!! - 17/12/02 11:49 PM
ok im really getting pissed every thing i find on socets i dont understand beacuse its to wordy i just want a simple script that will connect to a HTTP site and communicate with PHP!!!!!

Posted By: NeX Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 12:20 AM
You don't know search engines?
www.google.com And look for lessons...
There is thousands of sites which deals of mIRC !

NeX smirk
Posted By: watcher Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 12:24 AM
Socket tutorial
Posted By: Pasmal Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 01:08 AM
http://www.hdesk.org/documents/socks.php

and more useful for you:

http://www.hdesk.org/documents/protocol/http.php
Posted By: acemiles_ed OT: Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 04:09 AM
Technically your censoring should have been: F*CKING not F*UKING, unless of course people have started spelling it differantly wink


Tips:

1) Learn to spell
2) Learn to apply spelling with censoring
3) Use Google
Posted By: Lucifer Re: OT: Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 04:16 AM
differantly should be differently you mouthy err typey bitch
Posted By: wyx Re: OT: Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 04:53 AM
hehhehehheheh
like this ha
yuo have kileed by connection reset by perr
Posted By: Pasmal Re: OT: Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 06:31 AM
Or perhaps he did it on purpose to get the point across... I sometimes do cool
Posted By: Cassius Re: OT: Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 06:50 AM
looking and seeing that that was acemiles_ed's first post, I have to wonder if he signed up JUST to make fun of someone else's spelling...


you'll notice no spelling or grammatical errors in this post. wink cool
Posted By: Pasmal Re: OT: Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 07:20 AM
> you'll notice no spelling or grammatical errors in this post.

You're joking... right?
Posted By: wyx Re: OT: Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 10:57 AM
hmmmm it is serious??????? or joke ???
Posted By: ATMA Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 11:00 AM
DAMN IT CANT SOME ONE JUST MAKE A QUICK LITTLE SCRIPT FOR ME >_<
Posted By: wyx Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 11:09 AM
soryyyyy it's joke guy's don't be angry
Posted By: theRat Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 01:32 PM
Even if someone is willing to make you a script, he can't as he doesn't know what the script should do, you didn't gave us enough info.

Code:
on ^*:posting_to_mirc_boards:scripts&amp;popups: {
help $topic
while ( !$understand ) &amp;&amp; ( %i &lt;= 1000 ) {
find_tutorials $topic
help $topic
inc %i
}
search_mirc_boards
if ( $results ) {
read_the_boards
help $topic
}
else { post $topic }
}
alias find_tutorials {
run www.google.com/ $+ $replace(mirc script* $1-,$chr(32),+)
}

cool grin

Well, I suppose you can call "it" a "socket" and then you can f*ck it, but on the other hand, you won't get any "sockets" by being the 4$$h013 you are mad
Posted By: Merlin Re: F*UKING SOCKETS!!!!!!!!! - 18/12/02 01:34 PM
First of all:
Talking in all capital letters is considered bad manners (shouting) on irc chat. Please use lowercase letters.
Secondly we can't write your scripts - we only can point you to the right direction to fix certain errors or where you can learn more how to make it.

Read this help Pasmal gave you.
Posted By: floTTes Re: F**KING SOCKETS! - 19/12/02 10:39 AM
Hi,

I've some problems with my HTTP connection script. Maybe someone can help. I've got no problems when downloading a normal html file. But _calling_ a php file results in a html file messed up with a lot of "random" numbers (e.g. ed0, 85d, 869).
This script should read and post our clan wars into the channel, directly read from our war planer php file. "GetWarsReadVars" & "GetWarsUnsetVars" are usually used to read out my config file. Try:
set %GetWarsHost forums.mirc.com
set %GetWarsPort 80
set %GetWarsFilePath /ubbthreads.php
and:
set %GetWarsHost www.mirc.com
set %GetWarsPort 80
set %GetWarsFilePath /news.html

U'll see the difference. I really don't know why i'm getting such mess and how to avoid it.
Thanks in advance.

@ATMA: Maybe u can learn something from ... laugh

Code:
alias GetWarsReadVars {
  set %GetWarsHost forums.mirc.com
  set %GetWarsPort 80
  set %GetWarsFilePath /ubbthreads.php
  set %GetWarsProtocol HTTP/1.1
  set %GetWarsAuthType None
  set %GetWarsAuthName None
  set %GetWarsAuthPass None
  set %GetWarsLocalFile Forum.html
}

alias GetWarsUnsetVars {
  unset %GetWarsHost
  unset %GetWarsPort
  unset %GetWarsFilePath
  unset %GetWarsProtocol
  unset %GetWarsAuthType
  unset %GetWarsAuthName
  unset %GetWarsAuthPass
  unset %GetWarsLocalFile
}

alias GetWarsTransfer {
  GetWarsReadVars
  if (%GetWarsActive == $null) {
    echo -s *** Clan Wars Info Transfer STARTED! ***
    set %GetWarsActive 1
    set %GetWarsErrors 0
    sockopen GetWarsSock %GetWarsHost %GetWarsPort
  }
  else {
    echo -s *** Clan Wars Info Transfer ACTIVE! ***
  }
}

alias GetWarsErrChk {
  if (*HTTP/* 400* iswm %DL.Header.GetWarsSock) {
    if (%GetWarsHost isin %GetWarsFilePath) {
      set %GetWarsErrors 400001
    }
    else {
      set %GetWarsErrors 400000
    }
  }
  elseif (*HTTP/* 401* iswm %DL.Header.GetWarsSock) {
    if (%GetWarsAuthType == None) {
      set %GetWarsErrors 401001
    }
    elseif (%GetWarsAuthName == $null || %GetWarsAuthPass == $null) {
      set %GetWarsErrors 401002
    }
    else {
      set %GetWarsErrors 401000
    }
  }
  elseif (*HTTP/* 404* iswm %DL.Header.GetWarsSock) {
    set %GetWarsErrors 404000
  }
}

on *:sockopen:GetWarsSock:{
  if ($sockerr &gt; 0) {
    GetWarsUnsetVars
    unset %GetWarsActive
    unset %GetWarsErrors
    echo -s *** ERROR: Remote Host Does NOT RESPOND! ***
    echo -s *** Clan Wars Info Transfer ABORTED! ***
    return
  }
  sockwrite -n GetWarsSock GET %GetWarsFilePath %GetWarsProtocol
  sockwrite -n GetWarsSock Host: %GetWarsHost
  sockwrite -n GetWarsSock Connection: keep-alive
  if (%GetWarsAuthType == Basic) {
    sockwrite -n GetWarsSock Authorization: %GetWarsAuthType $encode(%GetWarsAuthName $+ : $+ %GetWarsAuthPass,mt)
  }
  sockwrite GetWarsSock $crlf
}

on *:SOCKREAD:GetWarsSock:{
  if ($sockerr &gt; 0) {
    GetWarsUnsetVars
    unset %GetWarsActive
    unset %GetWarsErrors
    echo -s *** ERROR: Remote Host Does NOT RESPOND! ***
    echo -s *** Clan Wars Info Transfer ABORTED! ***
    return
  }
  if (%DL.Check.GetWarsSock == $null) {
    sockread %DL.Header.GetWarsSock
    if (%DL.Header.GetWarsSock) {
      echo -s %DL.Header.GetWarsSock
    }
    GetWarsErrChk
    if ($gettok(%DL.Header.GetWarsSock,1,32) == Content-Length:) {
      sockmark GetWarsSock $gettok(%DL.Header.GetWarsSock,2,32)
    }
    if ($len(%DL.Header.GetWarsSock) &lt; 4) {
      if ($sock(GetWarsSock).mark == $null) {
        sockmark GetWarsSock Unknown
      }
      set %DL.Check.GetWarsSock 1
    }
    halt
  }
  if (%GetWarsErrors != 0) { return }
  :start
  sockread &amp;DL.File.GetWarsSock
  if ($sockbr == 0) { return }
  bwrite %GetWarsLocalFile -1 &amp;DL.File.GetWarsSock
  goto start
}

on *:SOCKCLOSE:GetWarsSock:{
  unset %DL.Header.GetWarsSock
  unset %DL.Check.GetWarsSock
  GetWarsUnsetVars
  unset %GetWarsActive
  if (%GetWarsErrors != 0) {
    if (%GetWarsErrors == 400000) {
      echo -s *** ERROR: Bad Request! Check Remote File Location! ***
    }
    if (%GetWarsErrors == 400001) {
      echo -s *** ERROR: Bad Request! Host Must Not Be Included In Remote File Location! ***
    }
    elseif (%GetWarsErrors == 401000) {
      echo -s *** ERROR: HTTP Authorization Failed! Check UserID And Password! ***
    }
    elseif (%GetWarsErrors == 401001) {
      echo -s *** ERROR: HTTP Client Authorization Must Be Enabled! ***
    }
    elseif (%GetWarsErrors == 401002) {
      echo -s *** ERROR: HTTP Authorization UserID AND Password Must Be Given! ***
    }
    elseif (%GetWarsErrors == 404000) {
      echo -s *** ERROR: File Not Found! Check Remote File Location! ***
    }
    else {
      echo -s *** ERROR: Unknown Connection Error! ***
    }
    echo -s *** Clan Wars Info Transfer ABORTED! ***
  }
  else {
    echo -s *** Clan Wars Info Transfer FINISHED! ***
  }
  unset %GetWarsErrors
}
Posted By: Cassius Re: OT: Re: F*UKING SOCKETS!!!!!!!!! - 27/12/02 01:32 PM
Of course I was joking... I didn't think we had a bunch of uptight English majors on our hands here... but apparently we do.

*shrugs* Not that I care...

Maybe people were jumpy because of impending finals or the oncoming holiday season... but I'd appreciate it if you wouldn't read malice into my thoughts, tyvm.

Message me privately if you have anything to say to me... someone already has... lol.. so sad...
Posted By: JayGuerette Re: F**KING SOCKETS! - 05/01/03 05:50 AM
Those aren't random characters. You're talking to a server that is using chunked transfer encoding. Those are chunk size codes. Look it up, it's easy to decode. The headers from the server should indicate it's doing chunking.
© mIRC Discussion Forums