- ob_start: documentation ( source)
- json_decode: documentation ( source)
- error_reporting: documentation ( source)
- json_encode: documentation ( source)
- header: documentation ( source)
<?php
ob_start();
error_reporting(0);
header("Content-Type: application/json; charset=UTF-8");
$havola = $_GET['url'];
$api = array();
$api[] = 'origin: https://videodownloaderpro.net';
$api[] = 'referer: https://videodownloaderpro.net/';
$api[] = 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36';
$curl = curl_init();
$config = array(
CURLOPT_URL => "https://api.videodownloaderpro.net/api/convert",
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $api,
CURLOPT_POSTFIELDS => array('url'=>$havola));
curl_setopt_array($curl, $config);
$response = curl_exec($curl);
curl_close($curl);
$json = json_decode($response);
echo json_encode($json,JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
?>