Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-07-2003, 09:50 AM
Moderator
 
Join Date: Jun 2001
Location: BTHO
Posts: 750
Rep Power: 106
MENJ is on a distinguished road
Send a message via ICQ to MENJ
Rotating quote script

Anyone have the php code for a rotating quote script?

- MENJ
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-07-2003, 11:29 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
Ask MHR for MORE!
dia banyak script best2.. buat sendiri pun banyak .,.
tanyalaaa :P
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-07-2003, 10:25 AM
lcf's Avatar
lcf lcf is offline
Pro-Blogger
 
Join Date: Feb 2003
Location: Kluang, Johor
Posts: 2,376
Rep Power: 118
lcf will become famous soon enough
Send a message via ICQ to lcf Send a message via MSN to lcf Send a message via Yahoo to lcf
  #4 (permalink)  
Old 07-07-2003, 01:51 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
saya ada satu skript ransom script yang diubah dari asalnya random image.
berfungsi dengan baik juga. cuma kurang pasti setakat mana best atau tidak,
mungkin MHR leh komen
semua quote dimasukkan sebagai *.txt , satu quote satu file.

PHP Code:
<?
// Mysticmind Random Quote X.X
// modified from random image script ( unknown originality )
 
// baca dir
$folder=opendir("./txt");  // pastikan dir txt quote dimana 
while ($file readdir($folder)) 
$names[count($names)] = $file
closedir($folder);
// susun nama file
sort($names);
// buang yang tak mau
$tempvar=0;
for (
$i=0;$names[$i];$i++){
$ext=strtolower(substr($names[$i],-4));
if (
$ext==".txt"){$names1[$tempvar]=$names[$i];$tempvar++;}
}
// set random 
srand ((double) microtime() * 10000000);
$rand_keys array_rand ($names12);
// random quote from array
$rdfile=$names1[$rand_keys[0]]; 
// mulakan pemaparan random quote
// data quote dimasukkan melalui quote
include ("txt/$rdfile");
?>
cubelah dulu.
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-07-2003, 02:24 PM
ardiles's Avatar
Senior Webmaster
 
Join Date: Mar 2003
Location: Kamunting, Perak
Posts: 640
Rep Power: 83
ardiles is on a distinguished road
Send a message via MSN to ardiles Send a message via Yahoo to ardiles
apa maksud 'buang yang tak mau tu'... mysticmind?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-07-2003, 05:15 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
PHP Code:
// buang yang tak mau 
disitu bermakna, hanya pilih file *.txt saja.
kalau nak buh html pun boleh.. tambah la jenis kat situ..
mana ah tau, takut2 termasuk file jpg dalam tuh
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-07-2003, 03:50 PM
ardiles's Avatar
Senior Webmaster
 
Join Date: Mar 2003
Location: Kamunting, Perak
Posts: 640
Rep Power: 83
ardiles is on a distinguished road
Send a message via MSN to ardiles Send a message via Yahoo to ardiles
ooo... mcm tu ke... ingatkan dia discard-kan mana2 qoute yg dah berulang...
senang paham, conclusion: extension fail yg nak di'qoute'kan...
trimas!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-07-2003, 05:28 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
ko dah test tak?
jadik tak?
mana MHR nih..
mementang ah banyak project online skang..
ilang terus.. blub blub
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 08-07-2003, 05:38 PM
MHR's Avatar
MHR MHR is offline
Senior Webmaster
 
Join Date: Sep 2001
Location: epox
Posts: 435
Rep Power: 96
MHR is on a distinguished road
Send a message via ICQ to MHR Send a message via Yahoo to MHR
ahaks... try la dulu... kalau aku nak buat random quote script, aku guna sql
__________________
Munzir + "/^[Hh](a)(z)\1\2[iI]$/"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 08-07-2003, 05:42 PM
ardiles's Avatar
Senior Webmaster
 
Join Date: Mar 2003
Location: Kamunting, Perak
Posts: 640
Rep Power: 83
ardiles is on a distinguished road
Send a message via MSN to ardiles Send a message via Yahoo to ardiles
x test lagi... just nak faham dulu...
bior pandai....
lagipun, easyphp aku asyik error je.... x larat nak install dah...
error: x leh connect ke database... hampes!
insya-*****, kalu dah ok, aku try!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 13-07-2003, 02:51 AM
zaimlah's Avatar
Inspired Webmaster
 
Join Date: Jul 2001
Location: ttdi
Posts: 129
Rep Power: 92
zaimlah is on a distinguished road
a'kum dan salam sejahtera! apa khabar semua?

ni lagi satu suggestion. kali ni semua quotes dalam satu file saja:
PHP Code:
$filename "quotes.txt";
$quotes file($filename);
srand ((double) microtime() * 10000000);
$n rand(0count($quotes) - 1);
echo 
$quotes[$n]; 
(all quotes are in quotes.txt, one quote per line.)

alright, it's good to be back.
__________________
blog:zaim_bakar_blog | biz:box
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 14-07-2003, 05:00 PM
MHR's Avatar
MHR MHR is offline
Senior Webmaster
 
Join Date: Sep 2001
Location: epox
Posts: 435
Rep Power: 96
MHR is on a distinguished road
Send a message via ICQ to MHR Send a message via Yahoo to MHR
idup lagi ko zaimlah?
__________________
Munzir + "/^[Hh](a)(z)\1\2[iI]$/"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 14-07-2003, 07:12 PM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
a ah .. tak sangke nih...
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 15-07-2003, 02:44 PM
Moderator
 
Join Date: Jun 2001
Location: BTHO
Posts: 750
Rep Power: 106
MENJ is on a distinguished road
Send a message via ICQ to MENJ
Ahaks, tak sangka zaimlah ada lagi

Anyway, thanks pada you and mysticmind sebab kasi php rotating script tu, baru hari ni saya "timbul" balik kat WM. Nanti saya eksperimen, ya....

- MENJ
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 16-07-2003, 10:28 AM
ardiles's Avatar
Senior Webmaster
 
Join Date: Mar 2003
Location: Kamunting, Perak
Posts: 640
Rep Power: 83
ardiles is on a distinguished road
Send a message via MSN to ardiles Send a message via Yahoo to ardiles
sbg org baru, tergezut gak... ada lagi super mod ni... ingatkan meninggalkan post sahaja kat WM ni... 'post tanpa nisan'

pendeknya script tu... akan ku try!
kalau satu qoute tu pjgnya 2-3 baris, ok gak ke?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post rep