Hire a PHP programmer

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

  • mahsing
    replied
    ***bump***

    Leave a comment:


  • mahsing
    replied
    If someone could help to fix the script to mobilize the image url below


    I would love to pay you a small fee to your paypal.
    I dont mind sharing the script for all of us. :P
    I need this to be fixed urgently. Thanks

    Leave a comment:


  • mahsing
    replied
    Originally posted by GiLL View Post
    does that script has register or login system? or just a open download site ?i couldnt find any way to urlencode for external link because seems strange we cant change others url as i know ...
    It is just an open service to allow users to mobilize any webpages and downscale all images to fit in on their small mobile screen. Would really appreciate if any gurus here could help on this.

    Leave a comment:


  • GiLL
    replied
    Originally posted by mahsing View Post
    I am doing this because i would like to integrate this code to my existing mobilizer script. This mobilizer script helps users to mobilize any websites to fit on their mobile screen.

    If the script could handle the url with spaces, then it would be great!
    does that script has register or login system? or just a open download site ?i couldnt find any way to urlencode for external link because seems strange we cant change others url as i know ...

    Leave a comment:


  • mahsing
    replied
    Originally posted by GiLL View Post
    as i said url must correct as i show you now it will be waste time nothing else

    if url image name or path is without space it will work else not

    or some one may know how to solve this issue to fix this

    why you want use external links ? what will be if you added all images and that site activate hot link protection ?

    you should upload pictures at your site as i think and rename them easy way?
    I am doing this because i would like to integrate this code to my existing mobilizer script. This mobilizer script helps users to mobilize any websites to fit on their mobile screen.

    If the script could handle the url with spaces, then it would be great!

    Leave a comment:


  • GiLL
    replied
    as i said url must correct as i show you now it will be waste time nothing else

    if url image name or path is without space it will work else not

    or some one may know how to solve this issue to fix this

    why you want use external links ? what will be if you added all images and that site activate hot link protection ?

    you should upload pictures at your site as i think and rename them easy way?
    Last edited by GiLL; 29.12.09, 06:19.

    Leave a comment:


  • mahsing
    replied
    Originally posted by ranzit2 View Post
    hey i am not good with curl.ok now try rawurlencode.
    Edit--Sorry my bad i had not seen full topic.i dont think curl is used here.i will try to fix it.
    not working for all external image links.

    Leave a comment:


  • ranzit2
    replied
    Originally posted by mahsing View Post
    I did try to replace this
    PHP Code:
     $img $_GET['img']; 
    with this
    PHP Code:
     $img urlencode($_GET['img']); 
    Seems not working for all external image links.
    hey i am not good with curl.ok now try rawurlencode.
    Edit--Sorry my bad i had not seen full topic.i dont think curl is used here.i will try to fix it.
    Last edited by ranzit2; 29.12.09, 03:30.

    Leave a comment:


  • mahsing
    replied
    I did try to replace this
    PHP Code:
     $img $_GET['img']; 
    with this
    PHP Code:
     $img urlencode($_GET['img']); 
    Seems not working for all external image links.

    Leave a comment:


  • ranzit2
    replied
    Originally posted by mahsing View Post
    GiLL,

    Your script works GREAT!!!!

    But, do you have any idea why the image url below cannot be resized using your script?
    http://www.sun2surf.com/images/sun2s...Mohd%20Dom.jpg(The Link is not broken)

    Thanks
    use urlencode http://php.net/manual/en/function.urlencode.php

    Leave a comment:


  • mahsing
    replied
    GiLL,

    Your script works GREAT!!!!

    But, do you have any idea why the image url below cannot be resized using your script?
    http://www.sun2surf.com/images/sun2s...Mohd%20Dom.jpg(The Link is not broken)

    Thanks
    Last edited by mahsing; 29.12.09, 02:18.

    Leave a comment:


  • GiLL
    replied
    oh you want Resize external links images ? no worry lest use this
    but your images links seems broken with space % so might not resize or they might use hot link protection well for me i will show you this new code will work fine with external link


    lets say we have a image link



    and now we want to rezsize at our site so link will be with w=120&h=120




    and also i just google and pick this image link




    and we resize it



    or put any link after = and change w=120&h=120 as you want



    Code:
    <?php
    header ("Content-type: image/jpeg");
    /*
    JPEG / PNG Image Resizer
    Parameters (passed via URL):
    
    img = path / url of jpeg or png image file
    
    percent = if this is defined, image is resized by it's
              value in percent (i.e. 50 to divide by 50 percent)
    
    w = image width
    
    h = image height
    
    constrain = if this is parameter is passed and w and h are set
                to a size value then the size of the resulting image
                is constrained by whichever dimension is smaller
    
    Requires the PHP GD Extension
    
    Outputs the resulting image in JPEG Format
    
    By: Michael John G. Lopez - www.sydel.net
    Filename : imgsize.php
    */
    
    $img = $_GET['img'];
    $percent = $_GET['percent'];
    $constrain = $_GET['constrain'];
    $w = $_GET['w'];
    $h = $_GET['h'];
    
    // get image size of img
    $x = @getimagesize($img);
    // image width
    $sw = $x[0];
    // image height
    $sh = $x[1];
    
    if ($percent > 0) {
    	// calculate resized height and width if percent is defined
    	$percent = $percent * 0.01;
    	$w = $sw * $percent;
    	$h = $sh * $percent;
    } else {
    	if (isset ($w) AND !isset ($h)) {
    		// autocompute height if only width is set
    		$h = (100 / ($sw / $w)) * .01;
    		$h = @round ($sh * $h);
    	} elseif (isset ($h) AND !isset ($w)) {
    		// autocompute width if only height is set
    		$w = (100 / ($sh / $h)) * .01;
    		$w = @round ($sw * $w);
    	} elseif (isset ($h) AND isset ($w) AND isset ($constrain)) {
    		// get the smaller resulting image dimension if both height
    		// and width are set and $constrain is also set
    		$hx = (100 / ($sw / $w)) * .01;
    		$hx = @round ($sh * $hx);
    
    		$wx = (100 / ($sh / $h)) * .01;
    		$wx = @round ($sw * $wx);
    
    		if ($hx < $h) {
    			$h = (100 / ($sw / $w)) * .01;
    			$h = @round ($sh * $h);
    		} else {
    			$w = (100 / ($sh / $h)) * .01;
    			$w = @round ($sw * $w);
    		}
    	}
    }
    
    $im = @ImageCreateFromJPEG ($img) or // Read JPEG Image
    $im = @ImageCreateFromPNG ($img) or // or PNG Image
    $im = @ImageCreateFromGIF ($img) or // or GIF Image
    $im = false; // If image is not JPEG, PNG, or GIF
    
    if (!$im) {
    	// We get errors from PHP's ImageCreate functions...
    	// So let's echo back the contents of the actual image.
    	readfile ($img);
    } else {
    	// Create the resized image destination
    	$thumb = @ImageCreateTrueColor ($w, $h);
    	// Copy from image source, resize it, and paste to image destination
    	@ImageCopyResampled ($thumb, $im, 0, 0, 0, 0, $w, $h, $sw, $sh);
    	// Output resized image
    	@ImageJPEG ($thumb);
    }
    ?>
    Usage examples:
    Code:
    Resize an image to 25 x 25
    imgsize.php?w=25&h=25&img=path/to/image.jpg
    
    Resize an image to 50% the size
    imgsize.php?percent=50&img=path/to/image.jpg
    
    Resize an image to 50 pixels wide and autocompute the height
    imgsize.php?w=50&img=path/to/image.jpg
    
    Resize an image to 100 pixels tall and autocompute the width
    imgsize.php?h=100&img=path/to/image.jpg
    
    Resize to 50 pixels width OR 100 pixels tall, whichever resulting image is smaller
    imgsize.php?w=50&h=100&constrain=1&img=path/to/image.jpg
    working na ?
    Last edited by GiLL; 29.12.09, 01:20.

    Leave a comment:


  • mahsing
    replied
    GILL,

    Your script isnt work for
    Image URL 1
    Image URL 2
    Image URL 3

    Thanks

    Leave a comment:


  • GiLL
    replied

    Would really appreciate if someone could help me out of this.
    1.download attached file i added images.php replaced yours also added a font file
    2. upload both files on your site in same folder where you want to include
    3. use link like yoursite.com//resize.php?image=http://imagesitelink.com/photo.jpg&square=120

    now for you to show demo this is real link


    now we are going resize it with width 120




    now we are going resize it with width 50






    do you like it ?if yes use and invite your friends on this forum we dont need 5 dollor thanks
    Attached Files

    Leave a comment:


  • subzero
    replied
    ok i got one some where

    Leave a comment:

Working...
X