2017年9月23日 星期六

隨機相片

<?php
// 讀入資料
$j=0;
$fd = fopen ("絕對路徑/隨機相片.txt", "r");
while ($buffer = fgets ($fd, 4096))
{
$album[$j] = explode (",",$buffer);
$j++;
}
fclose($fd);

// 取亂數
$select=rand(4, count($album)-1);

// 顯示相簿
echo $album[$select][1];
echo "<br><a href=http://jnespic.blogspot.tw/ target=_blank>".$album[$select][0]."</a>";
?>



無靜音功能,只能退場了。
0,Picasa 刪掉舊的,貼新的,變更寬、高 160*120。1228歲末才藝表演,<embed type="application/x-shockwave-flash" src="https://picasaweb.google.com/s/c/bin/slideshow.swf" width="160" height="120" flashvars="host=picasaweb.google.com&hl=zh_TW&feat=flashalbum&RGB=0x000000&feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2F113721711845844136933%2Falbumid%2F5827346466331419761%3Falt%3Drss%26kind%3Dphoto%26authkey%3DGv1sRgCI-3gc2S1daqlQE%26hl%3Dzh_TW" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
1,Youtube <iframe width="160" height="138" src="http://www.youtube.com/embed/ayCobSM1vys?rel=0" frameborder="0" allowfullscreen></iframe>
2,Flash SWF 檔 <embed width="160" src="http://dl.dropbox.com/u/49741113/1001112.swf" wmode="transparent" type="application/x-shockwave-flash">


隨機相片.txt
3,------- 以上是範例&備註 -------
補救教學戶外教學,<iframe width="160" height="138" src="https://www.youtube.com/embed/e_8t2Uzro_k?autoplay=1" frameborder="0" allowfullscreen></iframe>
閩南語認證衝刺班,<iframe width="160" height="138" src="https://www.youtube.com/embed/KgToKnvEaLY&t=6s?autoplay=1" frameborder="0" allowfullscreen></iframe>

沒有留言:

張貼留言