I am developing a site which need a huge data dynamic in nature. I can’t afford such a huge data on my server but there are lot of sites using it. Let me clarify with an example.
Suppose a site hotel.com have list of all hotels. It allows user to search hotels with ajax query. As soon as user type a letter it shows possible hotel names with that letter and user selects out of them.
I am designing a site which need hotel names but i don’t have them all and lot of names keep on adding.
So how can I design a page so that when I enter a letter in my site, I get all relevant results from hotel.com in a drop-down menu?
EDIT 1
Based on replies, here are more specification. Based on microspino relpy, I think i can manage space if i scrap the data periodically. I wont be needing all the data once. So you can forget the space limitation. All I need is data which is not available to me directly.
EDIT 2
Based on solutions, i thought of a possible workaround that i can let user enter the hotel names manually and i can cross check their validity at backend based on the data on the hotel.com site. What shall i use to it at backend i.e fetch results from the site and compare them?
Ajax request generally don’t work cross domain. However there are some exceptions, IE will allow you to POST data but not look at the response, and JSONP can be set up as mentioned if both sides are willing participants.
However saying that “this can’t be done” isn’t exactly 100% correct. You can’t do this with javascript alone but you CAN set up a proxy locally to do it for you. Any server side programming language can handle grabbing information from another web site. In the past I’ve set up a local JSP proxy to pull the data and then just pointed my ajax call at the local JSP instead of the remote site.
See my answer here: stackoverflow answer for cross domain ajax calls which has another link to an example I posted. Java/JSP Proxy example
Setting up a JSP, ASP, PHP, etc…Proxy is your best bet and will give you what you want.