Question

There is a third party website that deals with restaurant reservations that I would like to provide a link in my app to. So if people are viewing the restaurant in my app, a link would be available to send them to the reservation service.

The problem is that the app does not supply an API that allows developers to generate links to specific restaurants.

I have however identified 5 or 6 different patterns in the their URL that, based on the restaurants name will eventually link to the proper restaurant.

I created a script that tries each one of these patterns and if a 404 error is received, it goes to the next pattern to try. If a 404 error is not received, I have then identified the proper link.

Potentially, if i implemented this solution, and the user is browsing through a bunch of restaurants in my app, it could ping the server for 404 errors a bunch of times. If a hundred people are using the app, it could ping the server thousands of times.

What I don't know is if receiving the 404 error thousands of times will cause a Denial of service. Because if it does, I have to come up with another solution.

Was it helpful?

Solution

This depends on the available resources for the servers you are hitting and the pattern you are using. Really you should get in contact with the owners to answer this question as by making lots of potentially invalid requests you COULD be DDoSing them at worst or if not potentially costing them money in server/connection overheads. If that is not possible you may see reasonable results using a curl script to google the restaurant name along with the reservation websites name and following the first result. It's not very clean however it would stop you from hammering their website.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top