Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("../libs/proxy.php");
- require_once("../libs/config.php");
- require_once("../libs/ip.php");
- $rnd = intval(rand(1000,9999)); //generate random number
- $lnk_lnk = "../$db_name/lnk/$userip.xxx"; //link path
- $clm_lnk = "../$db_name/claims/$userip.xxx"; //link path
- if (file_exists($clm_lnk)) {
- $claims = file_get_contents($clm_lnk);
- }
- else {$claims = "0";}
- try {
- $details = substr(file_get_contents("http://ipinfo.io/{$userip}/country"), 0, 2);
- if ($details=="US" || $details=="AU" || $details=="NZ" || $details==="GB" || $details==="DE" || $details==="NL" || $details==="FR" || $details==="CA" || $details==="NO" || $details==="SE" || $details==="SA" || $details==="TN")
- {
- $api_url = "https://zap.in/api/zap/?apiKey=YOU_API_KEY_HERE_WITHOUTQUOTES&url=$site_url/links/verifier.php?id=$rnd";
- }
- else
- {
- $api_url = "https://zap.in/api/zap/?apiKey=YOU_API_KEY_HERE_WITHOUTQUOTES&url=$site_url/links/verifier.php?id=$rnd";
- }
- } catch (Exception $e) {
- $api_url = "https://zap.in/api/zap/?apiKey=YOU_API_KEY_HERE_WITHOUTQUOTES&url=$site_url/links/verifier.php?id=$rnd";
- }
- $get_link = file_get_contents($api_url);
- if (!empty($get_link)) {
- $m_lnk = fopen($lnk_lnk, "w"); //open link file
- fwrite($m_lnk, $rnd); //store random value
- fclose($m_lnk);
- header('Location: '.$get_link.'');
- } else {
- header("Location: ../index.php?lnkmsg=Unknown Error.");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement