Web Query with looping variables in the URL

T

titus.hanke

Hi all, I am hoping that somebody can help me with my problem bcause
have been trying for weeks to get this done and am failing because o
my lack of knowledge of VB. Here is what I intend to do...

For a student project, I want to analyze a set of given hotels an
their rates published. The Global Distrubion Systems (GDS) that contai
those published rates are used by several e-commerce websites t
display the rates to the online-customer. One of those sites is:

*http://www.available-rooms.com*

with the hotel search engine here:

http://res.available-rooms.com/nexres/search/power_search.cgi

When inserting the search options (arrival date, departure date, hote
name and location), the result is a page such as this:

<br /
<b>Warning</b>: mysql_pconnect(): Lost connection to MySQL serve
during query in <b>/home/sites/site15/web/db_connect.php</b> on lin
<b>3</b><br /
<br /
<b>Fatal error</b>: Call to undefined function: mysqlerror() i
<b>/home/sites/site15/web/db_connect.php</b> on line <b>3</b><br /


Notice that the URL carries ALL the information needed for the query:

- the hotel id number
- the arrival date
- the departure date
- number of guests
- the desired currency (in this case Euros)

In the search results, something like this appears:

WCT Call Center Discount Rates!

Total Rate: $749.39 USD
Rate Plan: WCT Call Center Discount Rate
Room Type: Deluxe Room with 2 Twins or 1 King Bed
$749.39 USD
(614.49 EUR)
Nightly Rate Book Now

The information I want to extract with the Excel web query is:

$749.39 USD
Deluxe Room with 2 Twins or 1 King Bed

=========================

This information should be queried for different date patterns though
so the URL should contain variables for the arrival and departur
dates, where the departure date is always arrival +2 days.

Example:

doa_dd=22&doa_mm=09
doa_dd=23&doa_mm=09
doa_dd=24&doa_mm=09
....
doa_dd=30&doa_mm=09

(DOA_DD = Date of Arrival_Day; DOA_MM = Date of Arrival_Month)

THERE IS a pretty good attempt already to be found here:
http://www.willowsolutions.com/tips/tips_2002_08.shtml

The problem is that with my lack of VB, I am not capable of modifyin
the code to my requirements...

In the long, long, long end of the process, I would ideally want
table structured something like this:

ArrivalDate Hotel 1 Hotel 2


22/09 EUR 499,00 EUR 437,00
23/09 EUR 479,00 EUR 429,00
24/09 EUR 499,00 EUR 399,00
25/09 EUR 519,00 EUR 478,00

..the whole thing for 5-10 hotels, to get a good picture for m
project... The date ranges should be somehow inputtable without to muc
difficulty (another sheet with all the dates arrival dates would b
perfectly fine...).

Anyway, I hope to have expressed myself somehow clearly and I do hop
that somebody has the time to read my huge post here !!! Thanks i
advance for anybody who can help me with my project as I am reall
getting desparate!!!

Regards, Titus
 
T

titus.hanke

Don said:
If you have a url like
http://tinyurl.com/2f96f
&bed_type=NP&num_beds=0&smoking_pref=NP&currency_id=&name=&brand=&priceband=

try breaking it up with variables such as

mycity="Austin"
cache=&" & mycity & "=austin&state


Hi Don,
thanks for the quick response. Actually that is exactly what I a
trying to do... The problem is I don't know how to write the VB part.
Could you or somebody else give me a hand? The URL carrying all th
information is GREAT for this purpose, using variables.

I would just need a macro that pulls the web query for a certain date
then moves xx lines down in the sheet and pastes the query result fo
the next date and the next date and so on...

Any ideas? Your help is really appreciated!!
 
T

titus.hanke

Hi all, I just thought I might create something more "visual" to let yo
guys better understand what I am trying to accomplish
 
T

titus.hanke

Hi all,
I figured out that maybe my post was too extensive and seeme
complicated. Let me try and reformulate the request:

I want to do a webquery, where the URL of the site to query contain
some variables I would like to change.

http://res.available-rooms.com/nexres/reservations/availability.cgi?hotels_id=10207371
&num_adults=2
&num_rooms=1
&currency_id=EUR
&DOA_DD=22
&DOA_MM=09
&DOD_DD=23
&DOD_MM=0

1. I need a query that counts through those variables in a certai
manner (VB?)

2. I need a macro that inserts the first query in A1, the next in A2
and so on.

Could anybody be so kind as to point me in the right direction?
All help is appreciated!!!
Thanks!
 
T

titus.hanke

...and there is really NOBODY who could help me?
Pleeeeeeeeeeeeeeeeeeeeeeaaaaaaaaaase!!!

Thanks :)

Titu
 
D

Don Guillett

Send me a private email with your GOOD email. This sounds like you need a
project done instead of a question answered.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top