2 Replies - 741 Views - Last Post: 23 June 2014 - 06:05 AM Rate Topic: -----

#1 waterislife   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-June 14

How to get data from expedia?

Posted 23 June 2014 - 05:06 AM

I'm fairly new to programming. I want to know how do i grab data from expedia For example in the link below I would like to grab the data in the availability box, that is dates and prices. It doesn't have to be expedia, can be any other site.

http://cruise.expedi...spx?item=857418
Is This A Good Question/Topic? 0
  • +

Replies To: How to get data from expedia?

#2 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4241
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: How to get data from expedia?

Posted 23 June 2014 - 05:19 AM

In the case of Expedia, their terms of service specifically prohibit you from doing a thing like that, so we wouldn't help you with that. (As per our terms of service.)

However in general, you could use any number of functions or extensions in PHP to grab the contents of a websites, file_get_contents or CURL for example. Then it's just a matter of finding what you need in the contents, which could involve anything from string manipulation, regular expression, to full on DOM parsing.

And that's assuming the contents are in a normal HTML document. In many cases you may also be talking about Javascript enabled sites that fetch or re-arrange data after the page has been loaded, which may make things trickier.

Also keep in mind that sites like Expedia don't generally like it when random people are appropriating their data for their own purposes, so they may even go out of their way to make it difficult. (I would.)
Was This Post Helpful? 0
  • +
  • -

#3 waterislife   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 23-June 14

Re: How to get data from expedia?

Posted 23 June 2014 - 06:05 AM

Thank you for your reply Atli. Appreciate it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1