whoami7 - Manager
:
/
home
/
bleuhbh
/
www
/
root
/
bots
/
lesinformes
/
Upload File:
files >> /home/bleuhbh/www/root/bots/lesinformes/sendmail.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); $html = substr($html, 0, $pos + 4); // echo $html // echo "Tiens : " . $html // if ($html !== false) { // // Step 1: Find the target marker in the HTML // $marker = 'Regarder le dernier'; // $pos = strpos($html, $marker); // echo "voila :" . $pos // // if ($pos !== false) { // // // Step 2: Extract a chunk of HTML before the marker (say, 300 characters) // // $before = substr($html, 0, $pos); // // echo "test:" . $before // // exit // // // Step 3: Find the last <a href=" before the marker // // $lastAHrefPos = strrpos($before, '<a href="'); // // if ($lastAHrefPos !== false) { // // $start = $lastAHrefPos + strlen('<a href="'); // // $end = strpos($before, '"', $start); // // $link = substr($before, $start, $end - $start); // // // Prepend domain if it's a relative link // // if (str_starts_with($link, "/")) { // // $link = "https://www.francetvinfo.fr" . $link; // // } // // echo "Found link: " . $link; // // } else { // // echo "No <a href=\" found before marker."; // // } // // } else { // // echo "Marker not found."; // // } // } else { // echo "Failed to retrieve the webpage."; // } //// Send mail //// // $to = "grezami@gmail.com"; // $subject = "Test mail PHP"; // $content = "The body/content of the Email"; // $headers = "From: Website <grezami@gmail.com>\r\nReply-To: grezami@gmail.com"; // if (mail($to, $subject, $content, $headers)) // echo "The email has been sent successfully!zefzef"; // else // echo "Email did not leave correctly!zfezfe"; ?>
Copyright ©2021 || Defacer Indonesia