December 08, 2024, 09:21:50 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

[PHP] Simple Dynamic Signature Tutorial

Pages: 1 [2] 3   Go Down
  Print  
Author Topic: [PHP] Simple Dynamic Signature Tutorial  (Read 6326 times)
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
« Reply #15 on: July 03, 2009, 07:30:23 am »

I don't know much php, but I'm pretty sure these two lines can't have spaces in them, when your locating where your image file is.
Code:
$image = imagecreatefrompng('real darkilscape userbar.JPG');
header('Content-Type: real darkilscape userbar.JPG');
Report Spam   Logged


Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
« Reply #16 on: July 03, 2009, 07:57:12 am »

The problem is, the error is showing up on line 7 Shocked

Also, I think the header is wrong.
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #17 on: July 03, 2009, 04:06:14 pm »

Ahh. So how do I fix it?
Report Spam   Logged






Celebrus
Artificially Conscious
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 626



View Profile WWW
Badges: (View All)
« Reply #18 on: July 04, 2009, 11:18:37 am »

make it this, you aren't supposed to change that.

header('Content-Type: image/jpg');
Report Spam   Logged

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #19 on: July 05, 2009, 12:40:41 am »

Ahh ok!
Thanks for that.
I'll try it when I get home and reply what it says, I'm at my cousins house.
Report Spam   Logged






Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #20 on: July 05, 2009, 03:25:38 am »

Ahh!
Now I get an error on line 4 .......
Heres link - http://darkilscape.hostoi.com/Real%20Darkilscape%20Userbar.PHP

Heres code -
Code:
<?php

$str 
$_GET['txt'];
$image imagecreatefromjpg('realdarkilscapeuserbar.jpeg');
$color imagecolorallocate($image000);
$font 'fonts/VISITOR.FON';
$x 275;
$y 9;
$size 15;
$rotation 0;
imagefontext($image$size$rotation$x$y$color$font$str);

heheader('Content-Type: image/jpeg');
imagepng($image);
imagedestroy($image);

?>


Note In Andrew Kaldas/Pictures - It says it's a JPEG Image, But when I uploaded to Photobucket it said it's a JPG Image. So I think code is wrong, Can you guys check it.
Report Spam   Logged






Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
« Reply #21 on: July 05, 2009, 07:54:01 am »

Line 4 should be imagecreatefromjpeg("file"); not imagecreatefromjpg("file");
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #22 on: July 06, 2009, 02:14:13 am »

Ahh!
Now i've got an error on line 7!

Code -
Code:
<?php

$str 
$_GET['txt'];
$image imagecreatefromjpeg("file");('realdarkilscapeuserbar.jpeg');
$color imagecolorallocate($image000);
$font 'fonts/VISITOR.FON';
$x 275;
$y 9;
$size 15;
$rotation 0;
imagefontext($image$size$rotation$x$y$color$font$str);

header('Content-Type: image/jpeg');
imagepng($image);
imagedestroy($image);

?>

Link - http://darkilscape.hostoi.com/DynamicDarkilscapeUserbar.PHP
Report Spam   Logged






Celebrus
Artificially Conscious
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 626



View Profile WWW
Badges: (View All)
« Reply #23 on: July 07, 2009, 04:48:11 am »

$image = imagecreatefromjpeg("file");('realdarkilscapeuserbar.jpeg');
Report Spam   Logged

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #24 on: July 07, 2009, 04:59:25 am »

I've got that on line 4.
Report Spam   Logged






Celebrus
Artificially Conscious
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 626



View Profile WWW
Badges: (View All)
« Reply #25 on: July 07, 2009, 05:10:59 am »

change it to this

$image = imagecreatefromjpeg('realdarkilscapeuserbar.jpeg');
Report Spam   Logged

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #26 on: July 07, 2009, 05:22:40 am »

Argh!
Now errors on Line 4, 5 and 11!

Code:
<?php

$str 
$_GET['txt'];
$image imagecreatefromjpeg('realdarkilscapeuserbar.jpeg');
$color imagecolorallocate($image000);
$font 'fonts/VISITOR.FON';
$x 275;
$y 9;
$size 15;
$rotation 0;
imagefontext($image$size$rotation$x$y$color$font$str);

header('Content-Type: image/jpeg');
imagepng($image);
imagedestroy($image);

?>

http://darkilscape.hostoi.com/DynamicDarkilscapeUserbar.PHP
Report Spam   Logged






Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
« Reply #27 on: July 07, 2009, 12:57:52 pm »

Line 4 and 5 errors are because the image isn't uploaded to the server.
Line 11 is because the function is imagettftext, not imagefontext.
Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Mojobojo82
MVP
MVP
Offline Offline

Gender: Male
Posts: 838


View Profile
Badges: (View All)
« Reply #28 on: July 08, 2009, 12:50:49 am »

Argh!
I uploaded the pic to the site.

Now when I click the Dynamic Sig it just comes up with the link Sad

http://darkilscape.hostoi.com/DynamicDarkilscapeUserbar.PHP

Code:
<?php

$str 
$_GET['txt'];
$image imagecreatefromjpeg('properdarkilscapeuserbar.jpg');;
$color imagecolorallocate($image000);
$font 'fonts/VISITOR.FON';
$x 310;
$y 10;
$size 15;
$rotation 0;
imagettftext($image$size$rotation$x$y$color$font$str);

header('Content-Type: image/jpg');
imagepng($image);
imagedestroy($image);

?>
« Last Edit: July 08, 2009, 01:29:02 am by mojobojo82 » Report Spam   Logged






Exilis
Optimistic & Creative
Global Moderator
Global Moderator
Offline Offline

Posts: 929


View Profile
Badges: (View All)
« Reply #29 on: July 08, 2009, 09:14:55 am »

Code:
<?php

$str 
$_GET['txt'];
$image imagecreatefromjpeg('properdarkilscapeuserbar.jpg');
$color imagecolorallocate($image000);
$font 'fonts/VISITOR.FON';
$x 310;
$y 10;
$size 15;
$rotation 0;
imagettftext($image$size$rotation$x$y$color$font$str);

header('Content-Type: image/jpg');
imagejpeg($image);
imagedestroy($image);

?>


You need to upload the font too.
« Last Edit: July 08, 2009, 09:18:46 am by SyntaxBlitz » Report Spam   Logged

Global Mod, (sort of) at your service.

http://twitter.com/timothyaveni

Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy