Results 1 to 7 of 7

Thread: [CoD 1.1] How should I call curl from gsc?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    system("php vpn.php "+self getIP()+" "+self.id);
    <?php
    $ip = $argv[1];
    $id = $argv[2];
    $ch = curl_init('http://proxycheck.io/v2/'.$ip.'?key=mykey&vpn=1&asn=1&risk=1');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $json = curl_exec($ch);
    curl_close($ch);
    $api_result = json_decode($json, true);
    $proxy=0;
    $risk=$api_result[$ip]['risk'];
    if($risk>65)
    $proxy=1;
    $mi = new mysqli("url", "login", "password", "dbname");
    $eboy=$mi->query("UPDATE `users` SET `city`='".$api_result[$ip]['city']."', `country`='".$api_result[$ip]['country']."', `isocode`='".$api_result[$ip]['isocode']."', `vpn`='".$proxy."' WHERE `realid`='".intval($id)."'");
    $mi->close();
    ?>
    Last edited by Paho; 26th March 2023 at 15:59.

  2. The Following User Says Thank You to Paho For This Useful Post:

    raphael (27th March 2023)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •