Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Nov 2005
    Posts
    7,708
    Tokens
    3,967
    Habbo
    Kasabian

    Latest Awards:

    Default <.< Help ::PHP::

    PHP Code:
     <?php

     $image 
    imagecreatefrompng('http://img148.imageshack.us/img148/9800/slipknot4qj.png');
     
    //$image = imagecreatefromjpeg('http://img148.imageshack.us/img148/9691/slipknot134832cv.jpg');
     
    $red imagecolorallocate($image25500);
     
     
    imagestring($image00,   0$_SERVER['REMOTE_ADDR'], $red);

    header ("Content-type: image/png");
     
    imagepng($image);
     
    imagedestroy($image);
    ?>
    What would be wrong with that?

  2. #2
    Join Date
    Jan 2006
    Posts
    2,593
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Stealth
    PHP Code:
     <?php

     $image 
    imagecreatefrompng('http://img148.imageshack.us/img148/9800/slipknot4qj.png');
     
    //$image = imagecreatefromjpeg('http://img148.imageshack.us/img148/9691/slipknot134832cv.jpg');
     
    $red imagecolorallocate($image25500);
     
     
    imagestring($image00,   0$_SERVER['REMOTE_ADDR'], $red);

    header ("Content-type: image/png");
     
    imagepng($image);
     
    imagedestroy($image);
    ?>
    What would be wrong with that?
    You have a .jpg image in there and the '
    header ("Content-type: image/png");' only searches for .png images!


    Last edited by James!; 26-05-2006 at 07:54 PM.

  3. #3
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    693
    Tokens
    0

    Default

    Quote Originally Posted by Devilman
    You have a .jpg image in there and the '
    header ("Content-type: image/png");' only searches for .png images!


    *BEEP* wrong.

    You really shouldn't act like you know something, when you don't.

    To clarify, Devilman; The jpg image was commented out, therefore, being ignored.

    The problem was, Stealth, all you did was rename the slipknot image, from, eg; slipknot.jpg to slipknot.png , thus keeping the jpeg format. I've taken the liberty to change the file format for you, and reupload it. So this script will work;
    PHP Code:
    <?php
    $image 
    imagecreatefrompng('http://img146.imageshack.us/img146/5871/slipknot9af.png');
    $red imagecolorallocate($image25500);
    imagestring($image00,   0$_SERVER['REMOTE_ADDR'], $red);
    header ("Content-type: image/png");
    imagepng($image);
    imagedestroy($image);
    ?>
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

  4. #4
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Wasn't the format supposed to include a $font??

  5. #5
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    693
    Tokens
    0

    Default

    Quote Originally Posted by Dentafrice
    Wasn't the format supposed to include a $font??
    Probably, but it works how it is. Test if you don't believe me.
    http://trav.mine.nu/test.php
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

  6. #6
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:


  7. #7
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    <?
    // ## Hab-World - subnav link
    header('Content-type: image/gif');
    if($_REQUEST['type'] == "over") { $im = @imagecreatefromgif('../images/nav_images/subnav_bg_on.gif'); } else { $im = @imagecreatefromgif('../images/nav_images/subnav_bg_off.gif'); }
    $white = imagecolorallocate($im, 51, 102, 152);
    $font = '../scripts/Volter (Goldfish).ttf';
    $text = $_REQUEST['text'];
    imagettftext($im, 6.4, 0, 20, 10, $white, $font, $text);
    imagegif($im, "", 100);
    imagedestroy($im);
    ?>

    Edit the $font with your own in a directory

  8. #8
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    693
    Tokens
    0

    Default

    http://trav.mine.nu/image.php

    Yeah, used the wrong link. -_-

    Like I said, you could add the font, but it works how it is atm.
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

  9. #9
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    But thats nothing but IP :p

  10. #10
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    693
    Tokens
    0

    Default

    Which is what he/she wanted! >.< lol.
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •