mIRC Home    About    Download    Register    News    Help

Print Thread
#2303 17/12/02 11:49 PM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
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!!!!!


#2304 18/12/02 12:20 AM
N
NeX
NeX
N
You don't know search engines?
www.google.com And look for lessons...
There is thousands of sites which deals of mIRC !

NeX smirk

#2305 18/12/02 12:24 AM
W
watcher
watcher
W

#2306 18/12/02 01:08 AM
Joined: Dec 2002
Posts: 103
P
Vogon poet
Offline
Vogon poet
P
Joined: Dec 2002
Posts: 103

A
acemiles_ed
acemiles_ed
A
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

L
Lucifer
Lucifer
L
differantly should be differently you mouthy err typey bitch

W
wyx
wyx
W
hehhehehheheh
like this ha
yuo have kileed by connection reset by perr

Joined: Dec 2002
Posts: 103
P
Vogon poet
Offline
Vogon poet
P
Joined: Dec 2002
Posts: 103
Or perhaps he did it on purpose to get the point across... I sometimes do cool

C
Cassius
Cassius
C
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

Joined: Dec 2002
Posts: 103
P
Vogon poet
Offline
Vogon poet
P
Joined: Dec 2002
Posts: 103
> you'll notice no spelling or grammatical errors in this post.

You're joking... right?

W
wyx
wyx
W
hmmmm it is serious??????? or joke ???

#2314 18/12/02 11:00 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
DAMN IT CANT SOME ONE JUST MAKE A QUICK LITTLE SCRIPT FOR ME >_<

#2315 18/12/02 11:09 AM
W
wyx
wyx
W
soryyyyy it's joke guy's don't be angry

#2316 18/12/02 01:32 PM
T
theRat
theRat
T
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

#2317 18/12/02 01:34 PM
M
Merlin
Merlin
M
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.

#2318 19/12/02 10:39 AM
F
floTTes
floTTes
F
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
}

C
Cassius
Cassius
C
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...

#2320 05/01/03 05:50 AM
J
JayGuerette
JayGuerette
J
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.


Link Copied to Clipboard