whoami7 - Manager
:
/
home
/
bleuhbh
/
www
/
root
/
bots
/
lesinformes
/
Upload File:
files >> /home/bleuhbh/www/root/bots/lesinformes/lastlink.php
<?php //// Scrap the audio link if possible //// $url = "https://www.francetvinfo.fr/replay-radio/les-informes-de-france-info/"; // Replace with the desired URL $html = file_get_contents($url); if ($html === false) { echo "Failed to retrieve the webpage: " . $url; exit; } $marker = 'href="/replay-radio/les-informes-de-france-info/'; $pos = strpos($html, $marker); $html = substr($html, $pos + 6, strlen($html)); $marker = '.html'; $pos = strpos($html, $marker); $html = substr($html, 0, $pos + 5); $url = "https://www.francetvinfo.fr" . $html; $html = file_get_contents($url); if ($html === false) { echo "Failed to retrieve the second webpage: " . $url; exit; } $marker = 'data-url="https://media.radiofrance-podcast.net/'; $pos = strpos($html, $marker); $html = substr($html, $pos + 10, strlen($html)); $marker = '.mp3'; $pos = strpos($html, $marker); $mp3_link = substr($html, 0, $pos + 4); $marker = 'podcast.net/'; $pos = strpos($mp3_link, $marker); $date = substr($mp3_link, $pos + 12, strlen($mp3_link)); $marker = '-'; $pos = strpos($date, $marker); $date = substr($date, $pos + 1, strlen($date)); $marker = '-'; $pos = strpos($date, $marker); $date = substr($date, 0, $pos); $jours = ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi']; $timestamp = DateTime::createFromFormat('d.m.Y', $date)->getTimestamp(); $jourSemaine = $jours[date('w', $timestamp)]; //// Create the media playing final webpage //// echo '<!DOCTYPE html>'; echo '<html lang="en">'; echo '<head>'; echo '<meta charset="UTF-8">'; echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; echo '<title> Dernier podcast disponible des informés </title>'; echo '<style>'; echo 'body { background-color:rgb(1, 1, 42); color:rgb(42, 42, 120); font-family: Arial, sans-serif; text-align: center; padding-top: 50px; }'; echo '</style>'; echo '</head>'; echo '<body>'; echo '<h1>Podcast du ' . $jourSemaine . ' ' . $date . '</h1>'; echo '<audio controls autoplay>'; echo '<source src="' . $mp3_link . '" type="audio/mpeg">'; echo 'Your browser does not support the audio element.'; echo '</audio>'; echo '</body>'; echo '</html>'; ?>
Copyright ©2021 || Defacer Indonesia