GooG Posted April 12, 2008 Share Posted April 12, 2008 Hi, I've been playing around a little with Greg Laabs HTTP UDF and found out that can't request two pages from the same stocket!?: CODE#include <HTTP.au3> $socket = _HTTPConnect("www.autoitscript.com") _HTTPPost("www.autoitscript.com", "/", $socket) $Response = _HTTPRead($socket) MsgBox(0, "", $Response) _HTTPGet("www.autoitscript.com", "/", $socket) $Response = _HTTPRead($socket) MsgBox(0, "", $Response) _HTTPClose($socket) The second _HTTPRead is just returning "0" and @error 3 timeout, why? I've also been trying to get the headers from a page: CODE#include <HTTP.au3> $socket = _HTTPConnect("www.autoitscript.com") _HTTPPost("www.autoitscript.com", "/", $socket) $Response = _HTTPRead($socket, 1) MsgBox(0, "", $Response[3][0]) MsgBox(0, "", $Response[3][1]) _HTTPClose($socket) But its just returning: Array variable has incorrect number of subscripts or subscript dimension range exceeded. What am I doing wrong? Link to comment Share on other sites More sharing options...
luzif3r Posted April 16, 2008 Share Posted April 16, 2008 the array entry [3] itself is a 2 dimensional array and you would be referring to some non existing array. my return value is called data here. this should help: $newdata = $data[3] MsgBox(0, "", $newdata[0][1]) to easily scout what your array(s) contain i like to use: _ArrayDisplay($array) use it like this in your example: _ArrayDisplay($data[3]) Link to comment Share on other sites More sharing options...
BrettF Posted April 16, 2008 Share Posted April 16, 2008 _ArrayDisplay($data) Is correct. Never seen it like $data[3] before... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
luzif3r Posted April 16, 2008 Share Posted April 16, 2008 _ArrayDisplay($data) Is correct. Never seen it like $data[3] before... it is correct in this case tho because $data[3] itself is a 2 dimensional array. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now