$rss = file_get_contents("http://feed250.photobucket.com/albums/gg268/castlecastle/computer_teach/feed.rss");
$p = explode("<item>", $rss);
$photo_num = count($p)-1;
for($i = 1;$i <= $photo_num;$i++){
$photo_url = explode('<guid>', $rss);
$photo_url[$i] = explode('</guid>', $photo_url[$i]);
$photo_title = explode('<media:title>', $rss);
$photo_title[$i] = explode('</media:title>', $photo_title[$i]);
$db->query("INSERT INTO photo (pid, alid, id, url, title, description, time, hits, able) VALUES ('', '1', '1', '{$photo_url[$i][0]}', '{$photo_title[$i][0]}', '{$photo_title[$i][0]}', '$time_now', '0', '1');");
}
呢3個 { } 搞到我煩足成晚...
唔加會變哂Array[0]...