There is such code on php and js:
<script src="js/jquery-3.2.1.min.js"></script> <?php echo file_get_contents('https://www.gismeteo.ru/weather-saratov-5032/'); ?> <script> $(document).ready(function(){ var wth = $(".tab-weather__value_l").text(); var str = wth.replace(/\s/g, ''); var ifminus = str.search( /^(?!-)\D*/ ); if (ifminus === 0) { var plusint = str.replace( /^(?!-)\D*/, ""); var plusint = plusint.replace( /\,/, "."); var plusint = plusint - plusint - plusint; console.log(plusint); } console.log(wth); console.log(str); console.log(ifminus); console.log("WATCH HERE"); console.log(parseFloat(plusint, 10)); console.log("WATCH HERE_2"); if (plusint > 0) { console.log("WORKING"); } else { console.log("UPS");} }); </script> <p>Checking</p> He displays the entire page of another site at his place, and there he searches for what he needs, and successfully finds ... I just do not need the display of this whole page, but I did not invent anything smarter than creating a div under it and hide it. Tell me, maybe there is a more civilized method?
file_get_contents? take simple-html-dom or analogs, and pull out the data. but it is better to get this data through CZK and save it somewhere. - teran