Well, I'm trying to make something like this: http://habbcrazy.net/hcv3/php/text.p...bo&border=blue
I know how to get the text, but I don't know how to make it the font I want.
This is worded pretty bad, but w.e. :D
Thanks.
PS - I'm new in PHP.
Printable View
Well, I'm trying to make something like this: http://habbcrazy.net/hcv3/php/text.p...bo&border=blue
I know how to get the text, but I don't know how to make it the font I want.
This is worded pretty bad, but w.e. :D
Thanks.
PS - I'm new in PHP.
Insert some html code into your echo? You'll have to ask someone else for the code... Or add a css style sheet?
PHP Code:<?php
$text = $_GET[ 'text' ];
?>
create.html
create.phpHTML Code:<form action="test.php" method="get">
String: <input type="text" name="string" />
<input type="submit" />
</form>
I know how to get the text. But how can I make the output the Volter Font with a black border :SPHP Code:<?php echo $_GET["string"]; ?>
Edit: Yes Will.
If your new with PHP, your going to struggle with this. We do ours using PHP GD. For the font, we have a file uploaded and for the background, a file uploaded.
Simon (Invent) did ours :)
If I turn every letter into a variable is there a way I can do it?
I know a way without using GD, but it's pretty stupid.
I'd like to know how to do this too :P
You could always use sIFR - but yeah, you can specify which font you use in GD.
You could, really stupid way, save each individual letter of Volter font with border in a folder and then replace each input letter with the url to the image.
Basic GD GET header would look like:
The output will be something likePHP Code:<?php
header("Content-type: image/png");
$text = htmlspecialchars($_GET['t']);
$im = imagecreatefrompng("images/header_bg.png");
$font = "volterb.ttf";
$white = imagecolorallocate($im, 255, 255, 255);
imagettftext($im, 7, 0, 9, 14, $white, $font, $text);
imagepng($im);
imagedestroy($im);
?>
http://shanes.sawhosting.com/c/header.php?t=Navigation
But if you want to put a 1px border round the letters it will be much much more complicated.
Here's a simple black border, it's not as thick as the other one though:
http://www.tehupload.com/uploads/app...8444738017.png
It's just --SS--'s code modified:
PHP Code:<?php
header( "Content-type: image/png" );
$text = htmlspecialchars( $_GET ['t'] );
$im = imagecreatefrompng( "header.png" );
$font = "volterb.ttf";
$white = imagecolorallocate( $im, 255, 255, 255 );
$black = imagecolorallocate( $im, 0, 0, 0 );
imagettftext( $im, 7, 0, 8, 15, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 14, $black, $font, $text );
imagettftext( $im, 7, 0, 10, 15, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 16, $black, $font, $text );
imagettftext( $im, 7, 0, 9, 15, $white, $font, $text );
imagepng( $im );
imagedestroy( $im );
?>
What is that all about, lol :P
And that GD thing will surely help me :D
The thing Jack said to Calon. I realise it's to do with that thread from a while ago, but I was jw lol.
Yeah it is just him carrying on a joke :P That's been used many many times.
I thought so :P.
Anyone notice my devious new avatar :P
He tested DIV's. ;)
Yeah, but he fails at his joke.. because he thinks that the joke was aimed at me (when I used the "overused" phrase above), so he thought he could create something intelligent.
No it isn't. Caleb is my brother though. I'm his brother Joshua. He's still here from Thanksgiving break.
No, he hasn't been on this account at all.
Considering I just said "he's still here from Thanksgiving break.." it means he is still at the house.
He's sitting about 4 feet across from me at his computer right now working on TehUpload.
I doubt it, I have had some long conversations with josh about some API's for a new site i'm working on, caleb (my lover) hasn't been on for a while... well always "away".
haha he's on MSN once in a while, he's always going in/out at random hours.
Its because he doesn't want to admit he's actually gay, and going out to get some lovin'.