Last active
December 25, 2015 21:49
-
-
Save danielribes/7045225 to your computer and use it in GitHub Desktop.
Manera rápida (de implementar) y muy básica para extraer los URL RSS del HTML de una web generada con Wordpress, o que tenga los metas type RSS concretos.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pagina = file('http://blogs.adobe.com/'); // aqui la URL de la web | |
foreach( $pagina as $linia) | |
{ | |
$eltoken = strstr($linia, 'type="application/rss+xml"'); | |
if( $eltoken ) | |
{ | |
$urltoken = strstr($eltoken, 'href="'); | |
$url = explode('"',$urltoken); | |
echo $url[1]; // aqui los ves | |
echo "<br />"; | |
} | |
// mejor no recorrer todo el array $pagina | |
if( strstr($linia, '</head>') ){ | |
break; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment