GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Easy Rotating SIG script. ( cut & paste ) (https://gfy.com/showthread.php?t=338739)

SmokeyTheBear 08-10-2004 03:17 AM

Easy Rotating SIG script. ( cut & paste )
 
Just cut and paste code into a text document, save it as sig.php , place in folder like www.yoursite.com/sig/sig.php then add all your images to the folder , then make your sig image point to the sig.php file and it will randomly display the images.

edit. your going to have to replace "haha123;" with the } ( the opposite of this one i.e. going the other way - like the bracket to the right of the "P" key , ) bracket because for some reason gfy has parsed it out of the code.

If you want to have the images in a different folder just edit the $folder from "." to "/folder/extension/"
PHP Code:

<?php

    $folder 
'.';
                
$extList = array();
    
$extList['gif'] = 'image/gif';
    
$extList['jpg'] = 'image/jpeg';
    
$extList['jpeg'] = 'image/jpeg';
    
$extList['png'] = 'image/png';
    
$img null;

if (
substr($folder,-1) != '/') {
    
$folder $folder.'/';
}

if (isset(
$_GET['img'])) {
    
$imageInfo pathinfo($_GET['img']);
    if (
        isset( 
$extListstrtolower$imageInfo['extension'] ) ] ) &&
        
file_exists$folder.$imageInfo['basename'] )
    ) {
        
$img $folder.$imageInfo['basename'];
    }
} else {
    
$fileList = array();
    
$handle opendir($folder);
    while ( 
false !hahahaha $file readdir($handle) ) ) {
        
$file_info pathinfo($file);
        if (
            isset( 
$extListstrtolower$file_info['extension'] ) ] )
        ) {
            
$fileList[] = $file;
        }
    }
    
closedir($handle);

    if (
count($fileList) > 0) {
        
$imageNumber time() % count($fileList);
        
$img $folder.$fileList[$imageNumber];
    }
}

if (
$img!=null) {
    
$imageInfo pathinfo($img);
    
$contentType 'Content-type: '.$extList$imageInfo['extension'] ];
    
header ($contentType);
    
readfile($img);
} else {
    if ( 
function_exists('imagecreate') ) {
        
header ("Content-type: image/png");
        
$im = @imagecreate (100100)
            or die (
"Cannot initialize new GD image stream");
        
$background_color imagecolorallocate ($im255255255);
        
$text_color imagecolorallocate ($im0,0,0);
        
imagestring ($im255,  "IMAGE ERROR"$text_color);
        
imagepng ($im);
        
imagedestroy($im);
    }
}

?>


Jace 08-10-2004 03:18 AM

damn dude, nice

your just mr helpful tonight...thanks

ClamSmacker 08-10-2004 03:42 AM

You really are a brain-iack and a good source of info :thumbsup

Veterans Day 08-10-2004 03:48 AM

smokey how can you be reached?

SmokeyTheBear 08-10-2004 03:55 AM

Quote:

Originally posted by Veterans Day
smokey how can you be reached?
start a fire :Graucho

smokey_the_bearz AT lycos.com

Veterans Day 08-10-2004 03:56 AM

Quote:

Originally posted by SmokeyTheBear
start a fire :Graucho

smokey_the_bearz AT lycos.com

:1orglaugh :thumbsup

AGF 08-10-2004 04:04 AM

looks really good :thumbsup

McKracken 08-10-2004 04:09 AM

I expect a lot more "free stuff" from the guy who got html banned around here... :glugglug

kaktusan 08-10-2004 04:13 AM

damn good idea Smokey
Nice work :thumbsup :thumbsup

pure energy 08-10-2004 04:14 AM

I hope loading that on my server doesn't make me become an unwitting tool yet for another SECURITY LESSON at GFY :(

hova 08-10-2004 04:20 AM

Quote:

Originally posted by McKracken
I expect a lot more "free stuff" from the guy who got html banned around here... :glugglug

SmokeyTheBear 08-10-2004 04:25 AM

Quote:

Originally posted by McKracken
I expect a lot more "free stuff" from the guy who got html banned around here... :glugglug
You could look at it like that or you could look at me as " the guy who saved your ass and everyone on gfy's ass from being owned by some fooligan at some point and using you and abusing you like a rag doll from corrupt html code "

Lensman could have hired someone to fix the html up nice and clean , it would have taken an hour.

arachnO 08-10-2004 04:37 AM

nice idea! :thumbsup :thumbsup

Ar3s 08-10-2004 04:45 AM

Nice bro!winkwink:

Clovis 08-10-2004 05:21 PM

very nice work

thanks

fr8 08-10-2004 05:26 PM

Thats a really good script. Wonder how it will effect the sig whores.

Repetitive Monkey 08-10-2004 05:30 PM

Quote:

Originally posted by fr8
Thats a really good script. Wonder how it will effect the sig whores.
I posted a PHP script that will rotate your sig banners/buttons and still let them have links, but it didn't affect any sigwhores then, so it will not now.

Repetitive Monkey 08-10-2004 05:33 PM

By the way, Smokey, why did you make it GD dependent when you can just stream the image right through?

SilverTab 08-10-2004 05:36 PM

Quote:

Originally posted by Repetitive Monkey
By the way, Smokey, why did you make it GD dependent when you can just stream the image right through?
yeah why not use fpassthru();


All times are GMT -7. The time now is 10:52 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123