-
26th March 2023, 15:57
#3
Private
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.
-
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
-
Forum Rules