Link to home
Start Free TrialLog in
Avatar of Rick Becker
Rick BeckerFlag for United States of America

asked on

How to use CURL to 'Click' a button on a page and preserve the Cookie

I have an interesting situation. I have a URL that returns data based on a 'search' parameter within the URL.. example: dvd_search.php?type=title&search='SomeData'

The Website has different areas that can be searched. Each are is accessed by 'clicking' a button (link) that takes you to that particular Page. From there you can query for data that is related to that Page/category.

The interesting part of this that the actual resulting URL looks the same no matter which page you are on... except it will only return data that is apropos to the page you are on.

I am trying to automate the Query process from within a VB.Net program and I am trying to use CURL to get the data into a file that I can parse.

I am not at all versed in the  use of CURL but I do know that this can probably be dome in CURL if I could figure out the proper syntax that would perform the desired function..

I am guessing here but I am assuming that the key to making this work is the 'Cookie' that is being generated, probably indicates which page 'I' am on and which 'Data Set' to use.

Any help is greatly appreitated.

Thanks in advance
Rick
Avatar of ste5an
ste5an
Flag of Germany image

The first step is to find out what happens behind the scenes. Use a sniffer like Fiddler to intercept the calls made by that web site. Parameters can be in the URL or in the request header or body as AJAX is pretty flexible.
Avatar of Rick Becker

ASKER

Hi Ste5an...

Thanks ... I will see if I can get more info on what is going on.. I have not used 'Fiddler' but I'll get it and try it out..

Thanks..

I'll send more info as I get it..

Rick
Greetings all..

While I do not have the specific solution to the issue that I am/was having, I have implemented a reasonable solution. Therefore I am going to close this   request and select "I found my own solution" ... sorry for the inconvenience to all.

However I will be posting another question concerning "Accessing MySQL Server from Windows Client"... just FYI

Thanks to all
Rick
ASKER CERTIFIED SOLUTION
Avatar of Rick Becker
Rick Becker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial