وبلاگ شخصی حامد شیرزاد
وبلاگ شخصی حامد شیرزاد
صفحات وبلاگ
نویسنده: حامد شیرزاد - ۱۳٩٠/۸/٤

words.txt


Take me out to the ball game
Take me out to the park
Buy me some peanuts and crackerjacks
I don't care if we ever get back
Root, root, root for the home team
If they don't win its a shame
For its one, two, three strikes your out
at the old ball game.


WofD.php


<?php
function wordofday(){
$filename = "words.txt";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
$array = explode("\n",$contents);
$date = date("z");
if(
$date > count($array)){
return
$array[0];
}else{
return
$array[$date];
}
}

echo
'<p>&nbsp;</p><p>'.wordofday().'</p>';
?>
نویسندگان وبلاگ:
مطالب اخیر:
کدهای اضافی کاربر :