Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php $link = $_GET['url']; $url = "https://api.tokcount.com/?type=videoId&usernam..
Decoded Output download
<?php
$link = $_GET['url'];
$url = "https://api.tokcount.com/?type=videoId&username={$link}";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
//for debug only!
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$resp = curl_exec($curl);
curl_close($curl);
$data = json_decode($resp, true);
$id = $data['id'];
if (isset($id)) {
$secondUrl = "https://tiktok.livecounts.io/video/download/{$id}";
$secondHeaders = array(
'Content-Type: application/json',
);
$ch = curl_init($secondUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $secondHeaders);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$secondResponse = curl_exec($ch);
if(curl_errno($ch)){
error_log('cURL error during the second request: ' . curl_error($ch));
}
curl_close($ch);
echo ($secondResponse);
} else {
echo json_encode(array("success" => false, "message" => "I don't know. Have error? Contact https://t.me/Api_zone_admin"));
error_log('Access token not present in the response.');
}
?>
Did this file decode correctly?
Original Code
<?php
$link = $_GET['url'];
$url = "https://api.tokcount.com/?type=videoId&username={$link}";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
//for debug only!
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$resp = curl_exec($curl);
curl_close($curl);
$data = json_decode($resp, true);
$id = $data['id'];
if (isset($id)) {
$secondUrl = "https://tiktok.livecounts.io/video/download/{$id}";
$secondHeaders = array(
'Content-Type: application/json',
);
$ch = curl_init($secondUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $secondHeaders);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$secondResponse = curl_exec($ch);
if(curl_errno($ch)){
error_log('cURL error during the second request: ' . curl_error($ch));
}
curl_close($ch);
echo ($secondResponse);
} else {
echo json_encode(array("success" => false, "message" => "I don't know. Have error? Contact https://t.me/Api_zone_admin"));
error_log('Access token not present in the response.');
}
?>
Function Calls
curl_init | 1 |
Stats
MD5 | ec03f577bf51a9666937c4effd650378 |
Eval Count | 0 |
Decode Time | 49 ms |