Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
printf("Current PHP version: %s \n", phpversion());
// инициализация сеанса
$ch = curl_init("https://vm.tiktok.com/ZMRjbHTVL/");
$url = 'https://vm.tiktok.com/ZMRjbHTVL/';
// установка URL и других необходимых параметров
//curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, true);
//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$res = curl_exec($ch);
$last_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
var_dump($last_url);
var_dump($res);
$headers = get_headers($url, 1);
var_dump($headers);
echo 1;