NameSilo

Text Into Images

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

InterM

New Member
Impact
0
Hi!

I need a code that makes me available to refer to a page that gives info fx:

My current money status (auto updated text on games homepage) is 143879 thousand. And I want it to have an image that has like a $ mark on it (I will make the image ;) ) and then behind that 143879000$ (Of course a lower number fx. 144M)

Can anyone help me?

Thankcx * InterM

Ill give all my NB$ to the first guy who gets me the code

Plz guys I really need this 1
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Someone please help :(
 
0
•••
0
•••
I have made a text into image script where you can have any text have a graphical output.. but I dont understand what you are talking about...

TS
 
0
•••
I think he is referring to the GD Library to output a .php file but do it like <img src="file.php">
 
0
•••
First, be sure the dollar sign is BEHIND the number, like this:

$1958729

Then, to add commas...

number_format($number);

Be sure the dollar sign isn't in the variable yet.

Then...

$output_text = "$".$number;

will create the formatted number with the dollar sign. Just stick this into a piece of GD code... and you're ready to go!

Actually, here:

PHP:
$im = imagecreatefrompng ('image.png');

$width_image = ImageSX($im);
$height_image = ImageSY($im);

//you need to tell GD2 where your fonts reside
//Be sure to make a fonts folder and upload the one(s)
//you want.
putenv('GDFONTPATH=/home/your_user_name/fonts/');
$fontname = 'verdana';
//If using a non-standard font, include the .ttf extention.
$font_size = 10;


  // We have found a font size that will fit
  // Now work out where to put it
  //x is how many pixels across to put text, y is up and down.
  $text_x = 10;
  $text_y = 15;
  $number = number_format($number);
  $black = ImageColorAllocate ($im, 0, 0, 0);
  ImageTTFText ($im, $font_size, 0, $text_x, $text_y, $black, $fontname, "$".$number);
                
 }
  Header ('Content-type: image/png');
  ImagePng ($im);

ImageDestroy ($im);
 
Last edited:
0
•••
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

More data. Your data. See what is new
Major update
We have made a number of features available to provide sellers more data for their domains and inquiries, and greater access to the data...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back