image rotator code/script that I can use here on GFY

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Juicy D. Links
    So Fucking Banned
    • Apr 2001
    • 122992

    #1

    image rotator code/script that I can use here on GFY

    anybody have idea?

    gotta somehow be usable with the VB Coode and the anti html restrictions
  • KimJI
    Confirmed User
    • May 2007
    • 1839

    #2
    You could do like some other people do:
    Create a database with the file names of the banners, and the URL it should point to. Then you make a cron job on your server that renames the "imagefile" to live-banner.jpg every x minutes and matches the redirect script with that image-name.

    Then you change your signature to use the www.server.com/live-banner.jpg and link it to http://yourserver.com/redirectscript.php


    That way you use the same static code, but the work is being done on your server
    Trafficadept | Best traffic I have ever tested | web "@t" cuul.org

    Comment

    • Pipison
      Confirmed User
      • Aug 2007
      • 251

      #3
      I am new user in gfy.com, i just sending my first postings. I hope you don’t have any problem with this ...see you and have a nice day.
      [email protected]
      ICQ:#455024744

      Comment

      • Juicy D. Links
        So Fucking Banned
        • Apr 2001
        • 122992

        #4
        Originally posted by Pipison
        I am new user in gfy.com, i just sending my first postings. I hope you don?t have any problem with this ...see you and have a nice day.

        fucking bot

        Comment

        • Juicy D. Links
          So Fucking Banned
          • Apr 2001
          • 122992

          #5
          Originally posted by KimJI
          You could do like some other people do:
          Create a database with the file names of the banners, and the URL it should point to. Then you make a cron job on your server that renames the "imagefile" to live-banner.jpg every x minutes and matches the redirect script with that image-name.

          Then you change your signature to use the www.server.com/live-banner.jpg and link it to http://yourserver.com/redirectscript.php


          That way you use the same static code, but the work is being done on your server
          cool ill give it a shot ltr see if i can get it to work

          Comment

          • Fletch XXX
            GFY HALL OF FAME DAMMIT!!!
            • Jan 2002
            • 60840

            #6
            Originally posted by Pipison
            I am new user in gfy.com, i just sending my first postings. I hope you don?t have any problem with this ...see you and have a nice day.
            just trying out a few rentatrolls dont mind this....

            Want an Android App for your tube, membership, or free site?

            Need banners or promo material? Hit us up (ICQ Fletch: 148841377) or email me fletchxxx at gmail.com - recent work - About me

            Comment

            • SmokeyTheBear
              ►SouthOfHeaven
              • Jun 2004
              • 28609

              #7
              make a new folder lets call it "smokey"

              upload all your pics you want to use in this directory , then save the following as index.php
              Code:
              <?php
              
              
              
              
              
              	$folder = '.';
              
              
                      $extList = array();
              	$extList['gif'] = 'image/gif';
              	$extList['jpg'] = 'image/jpeg';
              	$extList['png'] = 'image/png';
              	
              
              
              $img = null;
              
              if (substr($folder,-1) != '/') {
              	$folder = $folder.'/';
              }
              
              if (isset($_GET['img'])) {
              	$imageInfo = pathinfo($_GET['img']);
              	if (
              	    isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
                      file_exists( $folder.$imageInfo['basename'] )
                  ) {
              		$img = $folder.$imageInfo['basename'];
              	}
              } else {
              	$fileList = array();
              	$handle = opendir($folder);
              	while ( false !== ( $file = readdir($handle) ) ) {
              		$file_info = pathinfo($file);
              		if (
              		    isset( $extList[ strtolower( $file_info['extension'] ) ] )
              		) {
              			$fileList[] = $file;
              		}
              	}
              	closedir($handle);
              
              	if (count($fileList) > 0) {
              		$imageNumber = time() &#37; 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 (100, 100)
              		    or die ("Cannot initialize new GD image stream");
              		$background_color = imagecolorallocate ($im, 255, 255, 255);
              		$text_color = imagecolorallocate ($im, 0,0,0);
              		imagestring ($im, 2, 5, 5,  "IMAGE ERROR", $text_color);
              		imagepng ($im);
              		imagedestroy($im);
              	}
              } 
              ?>
              to call your random picture with bbcode use this
              Code:
              [tmg]http://yourdomain.com/smokey/[/tmg]
              Last edited by SmokeyTheBear; 09-07-2007, 09:21 AM.
              hatisblack at yahoo.com

              Comment

              • fris
                Too lazy to set a custom title
                • Aug 2002
                • 55679

                #8
                Originally posted by SmokeyTheBear
                make a new folder lets call it "smokey"

                upload all your pics you want to use in this directory , then save the following as index.php
                Code:
                <?php
                
                
                
                
                
                	$folder = '.';
                
                
                        $extList = array();
                	$extList['gif'] = 'image/gif';
                	$extList['jpg'] = 'image/jpeg';
                	$extList['png'] = 'image/png';
                	
                
                
                $img = null;
                
                if (substr($folder,-1) != '/') {
                	$folder = $folder.'/';
                }
                
                if (isset($_GET['img'])) {
                	$imageInfo = pathinfo($_GET['img']);
                	if (
                	    isset( $extList[ strtolower( $imageInfo['extension'] ) ] ) &&
                        file_exists( $folder.$imageInfo['basename'] )
                    ) {
                		$img = $folder.$imageInfo['basename'];
                	}
                } else {
                	$fileList = array();
                	$handle = opendir($folder);
                	while ( false !== ( $file = readdir($handle) ) ) {
                		$file_info = pathinfo($file);
                		if (
                		    isset( $extList[ strtolower( $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 (100, 100)
                		    or die ("Cannot initialize new GD image stream");
                		$background_color = imagecolorallocate ($im, 255, 255, 255);
                		$text_color = imagecolorallocate ($im, 0,0,0);
                		imagestring ($im, 2, 5, 5,  "IMAGE ERROR", $text_color);
                		imagepng ($im);
                		imagedestroy($im);
                	}
                } 
                ?>
                to call your random picture with bbcode use this
                Code:
                [tmg]http://yourdomain.com/smokey/[/tmg]
                did you code that?
                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                Comment

                • fris
                  Too lazy to set a custom title
                  • Aug 2002
                  • 55679

                  #9
                  bump for answer
                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                  Comment

                  • Juicy D. Links
                    So Fucking Banned
                    • Apr 2001
                    • 122992

                    #10
                    thx Smokeyyyyyyyyyyyy it works

                    Comment

                    • SmokeyTheBear
                      ►SouthOfHeaven
                      • Jun 2004
                      • 28609

                      #11
                      Originally posted by Fris
                      did you code that?
                      nope i found it somewhere .. psc i think
                      hatisblack at yahoo.com

                      Comment

                      Working...