Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--
- Télécharger vidéos "vod-fms.canalplus.fr"
- -----------------------------------------
- 1) Télécharger et installer un lecteur de flux RSS, par exemple ici :
- http://www.feedreader.com/releases/FeedReader314Setup.exe
- 2) Télécharger et installer un simulateur de Apache, par exemple ici :
- http://sourceforge.net/projects/quickeasyphp/files/EasyPHP/5.3.4.0/EasyPHP-5.3.4.0-setup.exe/download
- 3) Télécharger et installer de quoi télécharger les vidéos "vod-fms.canalplus.fr", par exemple ici :
- http://www.xi-soft.com/downloads/NXSetup_x86.zip
- (shareware gratuit 30 jours)
- 4) (Si EasyPHP est installé et Apache démarré)
- Enregistrer ce code avec comme nom de fichier "index.php" dans le dossier "www" du dossier temporaire correspondant à EasyPHP (par exemple : "C:\Program Files\EasyPHP-5.3.3\www\index.php")
- 5) (Si FeedReader est installé)
- Ajouter l'adresse "http://127.0.0.1/?rss=1" du flux RSS généré par ce code dans FeedReader
- 6) Selectionner/Copier l'adresse dans les champs de texte des articles
- 7) (Si NetTransport est installé)
- Ajouter le téléchargement avec les touches CTRL+U sur la fenêtre de NetTransport
- 8) Valider
- Ca télécharge ! ;)
- -->
- <?xml version="1.0" encoding="utf-8"?>
- <rss version="2.0">
- <channel>
- <title>http://127.0.0.1/?rss=1</title>
- <?php
- function totext($string) {
- $string = htmlentities(str_replace(" "," ",str_replace("<","",str_replace(">","",$string))),ENT_NOQUOTES);
- return($string);
- }
- function nbsptosp($string) {
- $string = str_replace(" "," ",$string);
- return($string);
- }
- if (@$_GET["rss"] == 1) {
- $url = array("http://www.canalplus.fr/c-divertissement/pid3349-le-grand-journal.html","http://www.canalplus.fr/c-divertissement/pid3355-l-edition-speciale.html","http://www.canalplus.fr/c-divertissement/pid3350-salut-les-terriens.html","http://www.canalplus.fr/c-divertissement/pid3351-le-petit-journal.html","http://www.canalplus.fr/c-divertissement/pid3565-c-le-news-show.html","http://www.canalplus.fr/c-infos-documentaires/pid3353-la-matinale.html","http://www.canalplus.fr/c-infos-documentaires/pid1830-zapping.html");
- $search1_a = totext('var videoId = "');
- $search1_b = totext('";');
- $search1_c = totext('<title>');
- $search1_d = totext(' - CANALPLUS.FR</title>');
- $search2_a = totext('<HAUT_DEBIT>');
- $search2_b = totext('</HAUT_DEBIT>');
- $var1 = 0;
- while ($var1 < count($url)) {
- $code1 = totext(file_get_contents($url[$var1]));
- $code1_ab = substr($code1,strpos($code1,$search1_a)+strlen($search1_a));
- $id = substr($code1_ab,0,-(strlen($code1_ab)-strpos($code1_ab,$search1_b)));
- $code1_cd = substr($code1,strpos($code1,$search1_c)+strlen($search1_c));
- $title = substr($code1_cd,0,-(strlen($code1_cd)-strpos($code1_cd,$search1_d)));
- $code2 = file_get_contents("http://service.canal-plus.com/video/rest/getVideosLiees/cplus/".$id);
- $line = explode("<HD>",$code2);
- $var2 = 0;
- $var3 = 1;
- while ($var2 < count($line)) {
- $line[$var2] = totext($line[$var2]);
- if (strpos($line[$var2],$search2_a) && strpos($line[$var2],$search2_b)) {
- $link = substr($line[$var2],strpos($line[$var2],$search2_a)+strlen($search2_a),-(strlen($line[$var2])-strpos($line[$var2],$search2_b)));
- echo "<item>
- <title><![CDATA[[".nbsptosp($title)."] [".date("d/m/Y")."] [Partie ".$var3."]]]></title>
- <description><![CDATA[<input type=\"text\" value=\"".$link."\" size=\"150\" />]]></description>
- </item>
- ";
- $var3++;
- }
- $var2++;
- }
- $var1++;
- }
- ?>
- </channel>
- </rss>
- <?php
- }
- else {
- ?>
- <link href="?rss=1" rel="alternate" type="application/rss+xml" />
- <?php
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement