twitter php
Publicado por juan (1 intervención) el 07/05/2011 21:15:20
buenas tardes, ante todo saludos a las personas que forman esta comunidad.Os expongo mi caso , no controlo casi nada de php y me he metido en un lío para insertar en una web los últimos mensajes de una cuenta de twitter. Pretendo hacerlo a traves de php e investigando por la web he llegado al código que os expongo debajo , subo el archivo a el servidor y me da error en la línea 4 ¿ me podeis ayudar? Os agradezco de antemano la ayuda prestada.
<html>
<body>
<?php
function get_tweets(RTpubTL30es,5) {
$feed = "http://search.twitter.com/search.atom?q=from:" . $usuario . "&rpp=" . $tweets;
$xml = simplexml_load_file($feed);
$boleano = 0;
foreach($xml->children() as $child) {
foreach ($child as $value) {
if($value->getName() == "content") {
$content = $value . "";
echo "<p class='twit".$boleano."'>".$content."</p>";
}
}
if($boleano == 0){
$boleano = 1;
}
else if($boleano ==1){
$boleano = 0;
}
}
}
?>
</body>
</html>
<html>
<body>
<?php
function get_tweets(RTpubTL30es,5) {
$feed = "http://search.twitter.com/search.atom?q=from:" . $usuario . "&rpp=" . $tweets;
$xml = simplexml_load_file($feed);
$boleano = 0;
foreach($xml->children() as $child) {
foreach ($child as $value) {
if($value->getName() == "content") {
$content = $value . "";
echo "<p class='twit".$boleano."'>".$content."</p>";
}
}
if($boleano == 0){
$boleano = 1;
}
else if($boleano ==1){
$boleano = 0;
}
}
}
?>
</body>
</html>
Valora esta pregunta


0