Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How to send large strings over http?

$
0
0
I want to send with either post or get serveral &vars= to a php page. This works with my first example as long as the total url string is less then something like 2000 chars.

[ autoit ]      
$sUrl="http://192.168.1.8/final/com/insert.php?test1=bla&test2=bla" $hDataBin=InetRead($sUrl,1) $sData=BinaryToString($hDataBin) msgbox(0,"",stringlen($sUrl)&". "&$sData)


So then I thought lets try something else like post with WinHttp.au3, but whatever I try this next example never sends anything.

[ autoit ]      
#include<WinHttp.au3> $hInternet = _WinHttpOpen() $hConnect = _WinHttpConnect($hInternet, "http://192.168.1.8") $sPost = "test1=bla&test2=bla" $sResult = _WinHttpSimpleRequest($hConnect, "POST", "/final/com/insert.php", '', $sPost) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hInternet) MsgBox(0, '',stringlen($str)&". "&$sResult)

So can anyone perhaps tell me how I could use autoit to make this work? Or is there some max on the post/get string?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>