(jacob_ 0 Newbie Poster

Greetings everyone,

This is my first post in this forum. I have been having an issue for a few weeks now and would appreciate all the help you can provide. Some forums out there have been deleting my post for no reason, so please, if you find there is anything technically objectionable or inappropriate, clarify this to me clearly. Thanks.

I am writing a windows application (windows forms) to automate some search requests to third party websites. These sites allow me to search for cars with the given car name, model year, etc. The websites that use url encoded parameters are easy to implement. I simply append the parameters to the url correctly and use this to create a HttpWebRequest object.

A few of the sites however do NOT use url encoded parameters, meaning the url remains fixed nomatter what search values I set in the page fields.

In order to recreate this search, I tried using http POST using querystrings and namevaluecollection pairs using the names/ids of their controls without result. I examined the cookies the site has stored for the search parameters without luck too. I was not able to examine Session variables since this does not exist in windows apps.

After viewing the source of the search page, I reached to the definition of the php form which is responsible for the post.

<form name="form2" method="post" action="auto_trform.php">

And within this form are the definitions of the controls you use to set search parameters.

<input name="select_year1" type="text" class="champsimple" id="year1" size="4" maxlength="4">
<p class="intitulesep">Prix maximum<br>
<input type="text" name="select_prix" maxlength="8" class="champlarge">

I wish to post to this form after setting the values of these fields, recreating what the browser is doing exactly. Would you kindly tell me how to get around doing this?

Thank you so much for your time. If you could add some code segments with your answer that would be really helpful.

Best Regards

Jacob

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.