mIRC Home    About    Download    Register    News    Help

Print Thread
#132405 10/10/05 11:36 AM
Joined: Oct 2005
Posts: 3
C
CLIPER Offline OP
Self-satisified door
OP Offline
Self-satisified door
C
Joined: Oct 2005
Posts: 3
Hi, I hope everyone is familiar of on how to get and post data in my mIRC
script in a secure way.

I tried this (mIRC script) one and I hope anyone can develop it in a nice way on how
to add the data into my MySQL db:

this is my mIRC script>>>>

alias postmessage {
set %pm.msg $$1-
sockopen post www.yoursite.com 80
}

on *:sockopen:post: {
sockwrite -nt $sockname GET $+(/postpage.php?message=,%pm.msg) HTTP/1.1
sockwrite -n $sockname Host: www.yoursite.com $+ $crlf $+ $crlf
unset %pm.msg
}

on *:sockread:post: {
sockclose $sockname
}


and this is my php page>>>
<?php
if (isset($_GET['message']) && $_GET['message'])
{
...
}
?>

I planned to have my co-admins to post there Nick and Rating in textbox or maybe the inputbox and then mIRC will send to my php script.
Anyone please help. Thanks!

#132406 10/10/05 08:43 PM
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
call me wrong on this one please dont you get the vars you send in the url with $_POST instead of $_GET ?


$maybe
#132407 11/10/05 04:51 AM
Joined: Oct 2005
Posts: 3
C
CLIPER Offline OP
Self-satisified door
OP Offline
Self-satisified door
C
Joined: Oct 2005
Posts: 3
I will try the _POST. Thanks

#132408 12/10/05 10:16 AM
Joined: Oct 2005
Posts: 3
C
CLIPER Offline OP
Self-satisified door
OP Offline
Self-satisified door
C
Joined: Oct 2005
Posts: 3
I hope this should one work for me.. smile

alias cliper {
sockclose post
sockopen post www.fcb.com.ph 80
sockmark post $$1-
}

on *:sockopen:post: {
var %s = sockwrite -tn $sockname, %data = $sock($sockname).mark
%s POST /postpage.php HTTP/1.1
%s Host: fcb.com.ph
%s Content-length: $len(%data)
%s
%s %data
}

on *:sockread:post: {
var %a
sockread %a
echo > %a
}

It shows OK to POST>. smile All I need now is code it in php.
Anyone have an idea what var doi I need to be called
in my php file?

I just want to have all what I will type in the main typing area
or in the Status when I join a channel. could that be possible?

Maybe I could use the on TEXT now.. smile


Link Copied to Clipboard