Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20

Thread: Rotating quote script

  1. #1
    Join Date
    Jun 2001
    Location
    BTHO
    Posts
    775
    Rep Power
    237

    Rotating quote script

    Anyone have the php code for a rotating quote script?

    - MENJ

  2. #2
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    277
    Ask MHR for MORE!
    dia banyak script best2.. buat sendiri pun banyak .,.
    tanyalaaa :P

  3. #3
    Join Date
    Feb 2003
    Location
    Kluang, Johor
    Posts
    2,367
    Rep Power
    249

  4. #4
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    277
    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.

  5. #5
    Join Date
    Mar 2003
    Location
    Kamunting, Perak
    Posts
    640
    Rep Power
    214
    apa maksud 'buang yang tak mau tu'... mysticmind?

  6. #6
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    277
    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

  7. #7
    Join Date
    Mar 2003
    Location
    Kamunting, Perak
    Posts
    640
    Rep Power
    214
    ooo... mcm tu ke... ingatkan dia discard-kan mana2 qoute yg dah berulang...
    senang paham, conclusion: extension fail yg nak di'qoute'kan...
    trimas!

  8. #8
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    277
    ko dah test tak?
    jadik tak?
    mana MHR nih..
    mementang ah banyak project online skang..
    ilang terus.. blub blub

  9. #9
    Join Date
    Sep 2001
    Location
    epox
    Posts
    432
    Rep Power
    228
    ahaks... try la dulu... kalau aku nak buat random quote script, aku guna sql
    Munzir + "/^[Hh](a)(z)\1\2[iI]$/"

  10. #10
    Join Date
    Mar 2003
    Location
    Kamunting, Perak
    Posts
    640
    Rep Power
    214
    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!

  11. #11
    Join Date
    Jul 2001
    Location
    ttdi
    Posts
    130
    Rep Power
    224
    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.

  12. #12
    Join Date
    Sep 2001
    Location
    epox
    Posts
    432
    Rep Power
    228
    idup lagi ko zaimlah?
    Munzir + "/^[Hh](a)(z)\1\2[iI]$/"

  13. #13
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    277
    a ah .. tak sangke nih...

  14. #14
    Join Date
    Jun 2001
    Location
    BTHO
    Posts
    775
    Rep Power
    237
    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

  15. #15
    Join Date
    Mar 2003
    Location
    Kamunting, Perak
    Posts
    640
    Rep Power
    214
    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?

Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Matrimonial Script with new feature, shaadi.com clone script
    By sahil101 in forum Website Programming
    Replies: 1
    Last Post: 14-10-2009, 01:23 PM
  2. how to quote a acceptable price for selling ads on forum?
    By seachen in forum Websites Review and Suggestion
    Replies: 4
    Last Post: 06-01-2008, 01:38 PM
  3. please quote for this
    By boonhuan in forum Looking To Hire
    Replies: 4
    Last Post: 15-09-2007, 07:04 AM
  4. How to get stock price quote on webpage?
    By gloss in forum Website Programming
    Replies: 4
    Last Post: 03-07-2007, 04:28 AM
  5. Need a Quote for future project...
    By ckita in forum Job Vacancies
    Replies: 4
    Last Post: 20-01-2005, 01:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112