sijimbo Posted March 15, 2010 Posted March 15, 2010 I have an array of IP addresses I am using as input. The program I am writing is to extract an XML file from a device on the network from each of the IP addresses in the array. This is what I am trying as input: InetGet("http://"&IP_Array[$x]&"/cgi-bin/getprogrambitrateshistories?scale=1",@ScriptDir & "\test.xml",0, 1) I have a DO UNTIL loop that moves through the array. The URL is the same on each of these devices but the IP addresses are different. I can configure this statically but I'd rather have it dynamic so that I only poll the device I need at that moment in time. Any assistance provided would be greatly appreciated.
funkey Posted March 15, 2010 Posted March 15, 2010 Wher is the problem? For $x = 0 To UBound($IP_Array) - 1 InetGet("http://" & $IP_Array[$x] & "/cgi-bin/getprogrambitrateshistories?scale=1", @ScriptDir & "\test.xml", 0, 1) Next Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
sijimbo Posted March 15, 2010 Author Posted March 15, 2010 Wher is the problem? For $x = 0 To UBound($IP_Array) - 1 InetGet("http://" & $IP_Array[$x] & "/cgi-bin/getprogrambitrateshistories?scale=1", @ScriptDir & "\test.xml", 0, 1) Next I figured it out. The problem was that what I posted was not being accepted by the INETGET function. I solved the problem by creating a variable $URL then used & to concatenated the text I wanted to use as input and then just modified it as so. $URL = $URL_BEGIN & $IP_Array[$x] & $URL_END InetGet($URL, @ScriptDir & "\test.xml", 0, 1) Thanks
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