i want to shorten the src

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Code:
    <?
    $percent="30";
    if($_GET['pic']){
        $image = $_GET['pic'];
    
        if($_GET['type']=="jpg"){
            header("Content-type: image/jpeg");
        }elseif($_GET['type']=="gif"){
            header("Content-type: image/gif");
        }elseif($_GET['type']=="png"){
            header("Content-type: image/png");
        }else{
            if(substr($image, -3)=="jpg" || substr($image, -3)=="JPG"){header("Content-type: image/jpeg");}
            elseif(substr($image, -3)=="gif" || substr($image, -3)=="GIF"){header("Content-type: image/gif");}
            elseif(substr($image, -3)=="png" || substr($image, -3)=="PNG"){header("Content-type: image/png");}
        }
    
        if(substr($image, -3)=="jpg" || substr($image, -3)=="JPG"){$im = imagecreatefromjpeg($image);}
        elseif(substr($image, -3)=="gif" || substr($image, -3)=="GIF"){$im = imagecreatefromgif($image);}
        elseif(substr($image, -3)=="png" || substr($image, -3)=="PNG"){$im = imagecreatefrompng($image);}
    
        
            $x = round((imagesx($im)*$percent)/100);
            $y = round((imagesy($im)*$percent)/100);
            $yyy=0;
            $xxx=0;
            $imw = imagecreatetruecolor($x,$y);
      
    
        imagecopyresampled($imw, $im, $xxx,$yyy,0,0,$x,$y,imagesx($im), imagesy($im));
    
       
            
            $watermark_color="fffff";
            $text = "Grim-Reaper.ws";
            $red=hexdec(substr($watermark_color,0,2));
            $green=hexdec(substr($watermark_color,2,2));
            $blue=hexdec(substr($watermark_color,4,2));
    
            $text_col = imagecolorallocate($imw, $red,$green,$blue);
            $font = "font/georgia.ttf"; 
            $font_size = 7;
            $angle = 90;
            $box = imagettfbbox($font_size, $angle, $font, $text);
            
            $x = round((imagesx($im)*30)/100);
            $y = round((imagesy($im)*30)/100);
            imagettftext($imw, $font_size, $angle, $x, $y, $text_col, $font, $text );
    
        
    
    if($_GET['type']=="jpg")
    {
    imagejpeg($imw);
    }
    else
    if($_GET['type']=="gif")
    {
    imagegif($imw);
    }
    else
    if($_GET['type']=="png")
    {
    imagepng($imw);
    }else{
            if(substr($image, -3)=="jpg" || substr($image, -3)=="JPG"){imagejpeg($imw);
    }else
    if(substr($image, -3)=="gif" || substr($image, -3)=="GIF"){imagegif($imw);
    }
    else
    if(substr($image, -3)=="png" || substr($image, -3)=="PNG"){imagepng($imw);
    }
    }
    imagedestroy($imw);
    }
    ?>
    Name it thumb.php

    edit the text to your site
    Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
    Visit: WapMasterz Coming Back Soon!
    _______
    SCRIPTS FOR SALE BY SUBZERO
    Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
    FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
    _______
    Info & Tips
    php.net
    w3schools.com

    Comment


      #17
      but what is the product URL of your image?
      Did I help you?
      You can help me too
      Your donations will help me finance my studies.

      Comment


        #18
        there still there lol u can test the images if you like...

        My product script is unique script

        well you can use this anytime bro why not use it and have fun with it???
        Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
        Visit: WapMasterz Coming Back Soon!
        _______
        SCRIPTS FOR SALE BY SUBZERO
        Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
        FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
        _______
        Info & Tips
        php.net
        w3schools.com

        Comment


          #19
          Originally posted by subzero View Post
          there still there lol u can test the images if you like...

          My product script is unique script

          well you can use this anytime bro why not use it and have fun with it???
          then thanks for sharing this script for FREE!

          btw is this script can do


          then the image is the avatar of the user?
          Did I help you?
          You can help me too
          Your donations will help me finance my studies.

          Comment


            #20
            its

            ?pic= URL FOR IMAGE
            Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
            Visit: WapMasterz Coming Back Soon!
            _______
            SCRIPTS FOR SALE BY SUBZERO
            Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
            FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
            _______
            Info & Tips
            php.net
            w3schools.com

            Comment


              #21
              im not using the whole URL for image, im using

              from /v2/index
              ../gallery/images/pic

              then i get the url




              it can be like this?

              Did I help you?
              You can help me too
              Your donations will help me finance my studies.

              Comment


                #22
                it can be like this?

                thumb.php?pic=UserID


                Yes
                Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
                Visit: WapMasterz Coming Back Soon!
                _______
                SCRIPTS FOR SALE BY SUBZERO
                Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
                FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
                _______
                Info & Tips
                php.net
                w3schools.com

                Comment


                  #23
                  yeah thats what i mean, how to do like that

                  the URL is http://coding-talk.com/v2/thumb.php?pic=UserID

                  the original image source is



                  my purpose is to hide the directory to gallery pics
                  Did I help you?
                  You can help me too
                  Your donations will help me finance my studies.

                  Comment


                    #24
                    It's mod_rewrite
                    My Blog: http://jhommark.blogspot.com
                    My Facebook: http://www.facebook.com/jhommark
                    My Official Site: http://www.undergroundweb.tk
                    My Community Site: http://undergroundwap.xtreemhost.com

                    Comment


                      #25
                      Originally posted by kiLLeR-eyEd_14 View Post
                      It's mod_rewrite
                      thanks for this info kabayan im referring to pinoy9's avatar :D
                      Did I help you?
                      You can help me too
                      Your donations will help me finance my studies.

                      Comment

                      Working...
                      X