Created
July 24, 2021 16:41
-
-
Save MrCyjaneK/736f93c9edd8310eac084b802017e184 to your computer and use it in GitHub Desktop.
5sim.net get cheapest price
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$prices = json_decode(file_get_contents("https://5sim.net/v1/guest/prices")); | |
$what = 'telegram'; | |
$endprice = []; | |
foreach ($prices as $key => $value) { | |
if (!isset($value->$what)) continue; | |
$endprice[$key] = $value->$what; | |
} | |
$min = 9999; | |
foreach ($endprice as $key => $v) { | |
foreach ($v as $k => $value) { | |
if ($value->count < 50) continue; | |
if ($value->cost < $min) { | |
$min = $value->cost; | |
echo "New best: ".$key." - ".$min."\n"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment