mIRC Home    About    Download    Register    News    Help

Print Thread
#142707 18/02/06 10:38 PM
Joined: Apr 2004
Posts: 218
P
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Hi! I'm really stumped on this one, I am really needed to be able to post an array using mIRC sockets..

Know how in PHP you can be like:
name='hello[]'

then you can be all like

foreach ($_POST['hello'] as $value) {
echo "<br />".$value;
}

and it would echo all the good stuff in hello[] off..
I'm trying to do the same thing thru regular mIRC socket.

I'm just confused on how I would post the data.

I've used:
var %post = $+(test['god',$chr(44),'hero'])
var %post = $+(test=['god',$chr(44),'hero'])
var %post = $+(test={'god',$chr(44),'hero'})

Code:
%w = sockwrite -n $sockname
%w POST /test.php HTTP/1.1
%w Referer: http://www.webby.com
%w Content-Type: application/x-www-form-urlencoded
%w Host: webby.com
%w Content-Length: $len(%post)
%w Connection: keep-alive
%w
%w %post


The page will return "invalid arguements for 'foreach...."

Anyone possibly know how to do this, if you understand what I'm trying to do ? Thanks!

- Zach.


Live to Dream & Dream for Life
#142708 19/02/06 01:26 AM
Joined: Apr 2004
Posts: 218
P
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
Well, All I cay say to myself is "Wow". I missed something in my brain and it flew right over me only for me to discover it later.

%post = hello[]=whaterver&hello[]=omg!&hello[]=i_found_an_array!

Just for anyone interested. ;x


Live to Dream & Dream for Life

Link Copied to Clipboard