There is a site aviasales.
I need to know the cheapest direction for a particular route on a certain date.
They have a free API .
There is a method that completely suits me. ( Returns the list of prices found by our users in the last 48 hours, in accordance with the filters set. ) However, if no one has searched for any route, then this method will not return anything to me. Ie, in order for this route to appear in this method you just need to search for it (go to the link like: https://www.aviasales.ru/search/KZN2601MOW30012)/ Then I can already get a price through the IPA.
Now I just started the zennoPoster program, which daily walks on the given url. But I do not like this approach, because computer must be constantly running. Renting a windows machine somewhere is expensive.
If on php, then just calling file_get_contents will not work, because the upload is javascript. Calculate the sequence, i.e. to search for what the airspace itself is doing inside and to which urls it addresses is long and unreliable, since the algorithm can always change unpredictably.
What variants of this decision still can be? Tell me please
CURLOPT_COOKIEJARandCURLOPT_COOKIEFILE. Then through the Kurl it is very easy to emulate walking through the pages as in a browser - working with cookies. Only it may not be suitable if the site has additional protection from this: for example, a one-pixel picture-beacon is loaded, or a request-beacon is made from deafly obfuscated js. - Goncharov Alexander