is it possible to get data from some air companies (like: "tickets" form where to where, its date and time, duration, "price",...) in PHP, and isn't it means stealing the data, cuz there are GDS companies which sells the data of all possible flights. So is "passing air company" legal, or not?
I was trying to get sources from URL, like file_get_content("URL of searched flight from ex. wizzair.com"), so I got different code, but through the browser, I can see the code how I want with (Ctrl + Shift + I or F12)
$url = "url of any searched flight";
$file = file_get_contents($url);
$pattern = '#<form id=" one of from, to, date, price* .+?</form>#s';
preg_match($pattern, $file, $matches);
want to get the data of flight tickets, (from where, to where, date&time, duration, price) from any air company website. And policy of getting data (legal or not?).
What you want is harder and harder these days.
You used to be able to simple get the HTML in (be it dynamically generated or not) via file_get_contents() and the likes, and find the parts you care about. While this CAN be hard, and error prone, it could be done. (When the webpage changed, you need to adjust your scraping routine)
Nowadays your average webpage is more like a javascript Christmas tree, all parts are fetched from different places, and the webpage is build in the browser, so the actual source HTML is much harder to interpret.
You could have a deeper look at the HTML in the page, and hope for an easy to use javascript call to some service that fetches the data based on some query. The creators of the page could have build that sloppy.
If it is legal for your research is of course your own call.