Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/12/2010, 07:48
fefefefe
 
Fecha de Ingreso: junio-2010
Mensajes: 128
Antigüedad: 13 años, 10 meses
Puntos: 2
Simple XML para tweet

Hola como estan puse en mi WEb un script en php para mostrar los ultimos tweet que es este
Código PHP:


               <?php
       
       
       my_twitter
("duhaldeladron",3);  
function 
my_twitter($usuario,$tweets) {  
   
$feed "http://search.twitter.com/search.atom?q=from:" $usuario "&rpp=" $tweets;  
    
$xml simplexml_load_file($feed);  
    
    
    foreach(
$xml->children() as $child) {  
         foreach (
$child as $value) {  
             if(
$value->getName() == "content") {  
                 
$content $value "";  
                 echo 
'<p class="twit">'.$content.'</p>';  
             }     
         }  
     }     
 } 

 
?>

Tengo bloqueado en el servidor la funcion simplexml y segun me dijeron no es recomendable abrirlo , alguien sabe como puedo utilizar el script y hacerlo funcionar por medio de una funcion global!!? gracias