Jump to content
Sign in to follow this  

HTTP GET/Parsing

Recommended Posts


I'm so far over my head I'm drowning. Any assistance is greatly appreciated.

I have used AutoIT to automate opening a URL, entering the login ID & Password, then proceeding. I have this script running on a virtual machine from my server. When I have the VM image open on my local PC and watch it the script runs fine. But when it run autonomously the first window fails to be come active and it hangs.

Digging through the forums I find comments about being able to parse information from a page call. But I have not found examples that I understand.

When I use this string (actual domain name removed here):

$oIE = _IECreate ("domain.com/api/xml?action=common-info&domain=domain.com")

I get this result on the IE screen:

<?xml version="1.0" encoding="utf-8" ?>

- <results>

<status code="ok" />

- <common locale="en" time-zone-id="85">



<host>http://$oie = _iecreate ("domain.com</host>





<user-agent>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; MS-RTC LM 8)</user-agent>



From this return text I need the cookie value <cookie>XB88ewrxwer999ser</cookie> in a string that I can use elsewhere.

How do I parse the cookie value into a string so I can use it as a variable?

I'm am assuming it would be similar to parse the value <status code="ok" /> from another URL call.

My plan is:

Open the URL in question

Get & Parse the cookie data into a variable

Use the cookie data in another URL string

Open the new URL

Check for the "status code" as "OK", if yes procees; if no error dialog

Capture the data returned from the URL string is proving elusive.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this