> suggéré pour Projet Autoblog */ if (!isset($_GET["name"])) die (); $name = $_GET["name"]; $str = file_get_contents("https://twitter.com/$name"); $nb = preg_match_all('%
\d+)"(.*)'. '(data-retweet-id="(?P\d+)"(.*))?'. 'data-screen-name="(?P[^"]+)"(.*)'. '(?P<fullname>[^(.*)'. 'data-time="(?P\d+)"(.*)'. '

(?P.*)

'. '%sU', $str, $arr); function parsemessage($message) { $message = preg_replace('%]+)>%', ']+)>https?://([^/]+)/[^<]*%', '[$2]', $message); $message = strip_tags($message); return $message; } $fullname = "?"; $updated = ""; if ($nb !== false) { for ($i = 0; $i < $nb; $i++) { $mname = $arr["name"][$i]; $mfullname = $arr["fullname"][$i]; if ($updated == "") $updated = date(DATE_ATOM, $arr["created"][$i]); if ($mname == $name) { $fullname = $mfullname; break; } } } header('Content-type: application/xml; charset=UTF-8', true); echo '' . PHP_EOL; ?> Twitter / <?php echo $name ?> tag:twitter.com,2013:Status: "> Twitter de . @$mname : "; $title = htmlspecialchars(parsetitle($rt . $message)); $header = "\"$mname\"/ $mfullname (@$mname)
\r\n"; $footer = "
\r\nAfficher la conversation"; $message = "$header$rt$message$footer"; $message = htmlspecialchars($message); if(substr($title, 0, 1) !== '@') { // exclude response echo << $title $message tag:twitter.com,2013:https://twitter.com/$name/status/$id $created $created $name https://twitter.com/$name HTML; } // end exclude response } } ?>