ini_set('max_execution_time', 6000); $minlat=0; $minlong=0; $maxlat=0; $maxlong=0; $cstuff=''; $delim=''; $valafters=''; $evn=1; $opcss=''; $tenthousand=10000; if (isset($_GET['geojson']) && isset($_GET['ccode'])) { if (isset($_GET['justthat'])) { $opcss="opacity:0.3;"; $tenthousand=120000; } $extras=''; $extra=''; $bigxy=file_get_contents('../../HTMLCSS/countries.html'); //$smallxy=file_get_contents('./image_chart.php'); $thelist=explode(',', str_replace('CN','CH',str_replace('+',' ',urldecode($_GET['ccode'])))); if (1 == 1) { for ($iii=0; $iii 1) { // && sizeof($records) > 1) { for ($ii=1; $iiGeoJson World Countries via Google Chart Image Chart Map Chart - RJM Programming - November, 2023
'; } else if (isset($_GET['ccode'])) { $bigxy=file_get_contents('./countries.html'); $smallxy=file_get_contents('./image_chart.php'); $recs=explode(' data-iso2="' . $_GET['ccode'] . '"', $bigxy); $records=explode(',' . $_GET['ccode'] . ',', $smallxy); if (sizeof($recs) > 1 && sizeof($records) > 1) { $valafters=explode(' value=', $records[0])[-1 + sizeof(explode(' value=', $records[0]))]; for ($ii=1; $ii 1) { $minlat=$ccs[1]; $minlong=$ccs[0]; $maxlat=$ccs[1]; $maxlong=$ccs[0]; for ($ij=2; $ij $ccs[1 + $ij]) { $minlat=$ccs[1 + $ij]; } if ($maxlat < $ccs[1 + $ij]) { $maxlat=$ccs[1 + $ij]; } if ($minlong > $ccs[0 + $ij]) { $minlong=$ccs[0 + $ij]; } if ($maxlong < $ccs[0 + $ij]) { $maxlong=$ccs[0 + $ij]; } } $from=$valafters . ',' . $_GET['ccode'] . ','; if (strpos($from, ' title=') === false && strpos($from, ' data-geo=') !== false) { $to=str_replace(' data-geo=', ' title=' . "\\\"" . str_replace(' ','',('' . $minlat . ',' . $minlong . ',' . $maxlat . ',' . $maxlong)) . "\\\" data-geo=", $from); // ... ' . $valafters; file_put_contents('./image_chart.php', str_replace($from, $to, $smallxy)); echo $to; } } } } exit; ?>