ads here
       

Go Back   Rewards1 Forums > Community Support > Guides


 
 
Thread Tools Display Modes
Old 07-29-2010, 11:59 AM   #1
Blockis
Elite Block
 
Blockis's Avatar
 
Join Date: Mar 2009
Location: Rochester, NY
Posts: 4,481
Blockis has a spectacular aura aboutBlockis has a spectacular aura about
Default [PHP] Random Image On Load

Alright, this is cool, if you have your own hosting.
  1. Open NotePad (Or whatever) and enter this:
    PHP Code:
    <?php

    //PHP Random Image -- Blockis.com

    $folder '';

    $exts 'jpg jpeg png gif';

    $files = array(); $i = -1;
    if (
    '' == $folder$folder './';

    $handle opendir($folder);
    $exts explode(' '$exts);
    while (
    false !== ($file readdir($handle))) {
    foreach(
    $exts as $ext) {
    if (
    preg_match('/\.'.$ext.'$/i'$file$test)) {
    $files[] = $file;
    ++
    $i;
    }
    }
    }
    closedir($handle);
    mt_srand((double)microtime()*1000000);
    $rand mt_rand(0$i);

    header('Location: '.$folder.$files[$rand]);
    ?>
  2. Save it as .PHP
  3. Upload it to your website
  4. Upload images to the same folder/directory as the .PHP file
  5. On forums, edit signature, and enter (WITHOUT THE *):
    Code:
    [IMG*]http://yourwebsitehere.com/nameofphpfile.php[/IMG]

It will load one of the images (randomly) in the same directory as the .PHP file on every refresh/load.

Enjoy!

Blockis
__________________
FileRev - Get Paid To Upload - Up To $0.75 PER Download!

Blockis is offline  
Old 07-29-2010, 12:05 PM   #2
Mason
Elite Moderator
 
Mason's Avatar
 
Join Date: May 2008
Location: NOVA SCOTIA
Posts: 4,226
Mason has a spectacular aura aboutMason has a spectacular aura about
Send a message via MSN to Mason
Default

itd be awkward if your pr0nz came up
__________________

I am the Alpha and the Omega
Mason is offline  
Old 07-29-2010, 12:08 PM   #3
Blockis
Elite Block
 
Blockis's Avatar
 
Join Date: Mar 2009
Location: Rochester, NY
Posts: 4,481
Blockis has a spectacular aura aboutBlockis has a spectacular aura about
Default

Well, if you were hosting pr0nz on your VPS, I guess, yeah.

Blockis
__________________
FileRev - Get Paid To Upload - Up To $0.75 PER Download!

Blockis is offline  
Old 07-29-2010, 12:10 PM   #4
Mason
Elite Moderator
 
Mason's Avatar
 
Join Date: May 2008
Location: NOVA SCOTIA
Posts: 4,226
Mason has a spectacular aura aboutMason has a spectacular aura about
Send a message via MSN to Mason
Default

Quote:
Originally Posted by Blockis View Post
Well, if you were hosting pr0nz on your VPS, I guess, yeah.

Blockis
up to 2700 refs
__________________

I am the Alpha and the Omega
Mason is offline  
Old 07-29-2010, 12:12 PM   #5
Blockis
Elite Block
 
Blockis's Avatar
 
Join Date: Mar 2009
Location: Rochester, NY
Posts: 4,481
Blockis has a spectacular aura aboutBlockis has a spectacular aura about
Default

Damn it Mason!

Blockis
__________________
FileRev - Get Paid To Upload - Up To $0.75 PER Download!

Blockis is offline  
Old 07-29-2010, 12:14 PM   #6
Mason
Elite Moderator
 
Mason's Avatar
 
Join Date: May 2008
Location: NOVA SCOTIA
Posts: 4,226
Mason has a spectacular aura aboutMason has a spectacular aura about
Send a message via MSN to Mason
Default

i now have $7 in paypal too, $4 more and i can get another vps
__________________

I am the Alpha and the Omega
Mason is offline  
Old 07-29-2010, 12:16 PM   #7
Blockis
Elite Block
 
Blockis's Avatar
 
Join Date: Mar 2009
Location: Rochester, NY
Posts: 4,481
Blockis has a spectacular aura aboutBlockis has a spectacular aura about
Default

GYAHHHHH

Blockis
__________________
FileRev - Get Paid To Upload - Up To $0.75 PER Download!

Blockis is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:59 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.