url: | https://torproxy.site/proxy/reset?token=TOKEN_CUA_BAN |
Method: | GET |
Thành công: | {'success':'true','proxy':'ip:port'} |
Thất bại: | {'success':"false",'msg':'msg trả lỗi'} |
Token: | lấy tại giao diện quản lí tài khoản |
Code Reset IP mẫu python
import requests
import time
def send_request():
base_url = "https://torproxy.site/proxy/reset?token=TOKEN_CUA_BAN"
headers = {
"accept": "application/xml, text/xml, */*; q=0.01",
"accept-language": "en-US,en;q=0.9,vi;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
}
response = requests.get(base_url, headers=headers)
return response
if __name__ == "__main__":
try:
while True:
send_request()
print("Request sent")
time.sleep(180)
except KeyboardInterrupt:
print("Script terminated by user.")
Code mẫu php
function send_request() {
$base_url = "https://torproxy.site/proxy/reset?token=TOKEN_CUA_BAN";
$headers = array(
"accept" => "application/xml, text/xml, */*; q=0.01",
"accept-language" => "en-US,en;q=0.9,vi;q=0.8",
"content-type" => "application/x-www-form-urlencoded; charset=UTF-8"
);
$options = array(
"http" => array(
"method" => "GET",
"header" => implode("\r\n", array_map(function ($key, $value) {
return "$key: $value";
}, array_keys($headers), $headers))
)
);
$context = stream_context_create($options);
$response = file_get_contents($base_url, false, $context);
return $response;
}
try {
while (true) {
send_request();
echo "Request sent\n";
sleep(180);
}
} catch (Exception $e) {
echo "Script terminated by user.\n";
}