Logo of the website

Any problem with PHP can be disscused here
Kaky
Posts: 274
Joined: Tue Apr 18, 2006 7:43 pm

Logo of the website

Post by Kaky »

I would like to know how to make that immage on the corners of pics like "this immage is hosted at:::::" how does it work because i am sure that they do not put that manualy on every pic...


Image

A funny picture -------> me , myself and i (too much for this world)
Freedom Fighter
Posts: 479
Joined: Tue May 16, 2006 11:53 am

Post by Freedom Fighter »

Umm what?
Ky
Posts: 181
Joined: Tue Apr 18, 2006 8:36 pm

Re: Logo of the website

Post by Ky »

Kaky wrote:I would like to know how to make that immage on the corners of pics like "this immage is hosted at:::::" how does it work because i am sure that they do not put that manualy on every pic...
Iframes, overlays, some scripts can embed watermark logo on the fly...try google
uz
Posts: 140
Joined: Sat Dec 24, 2005 5:32 pm

Post by uz »

pls make your request more clear
i did not get it
what d u want to do with image?
ohosale
Posts: 25
Joined: Thu Jun 29, 2006 11:59 am

Post by ohosale »

Photoshop???????? :oops:
Want flash banner or investment website not use hyip script but direct to e-gold $$$$$$ pm Me.
Image
reece
Posts: 55
Joined: Tue Apr 04, 2006 10:59 am

Post by reece »

php can change an image and i think it can add text so i think a php script
OnscrenSpider
Posts: 36
Joined: Mon Jul 04, 2005 8:37 pm

Post by OnscrenSpider »

:shock:
OMG
they use the "php GD library" to rewrite the images dynamically and past their image transparency signs or a simple text
search in google "php Gd library"
have a nice day
greetz
Lixas
Posts: 750
Joined: Wed Feb 16, 2005 4:21 pm

Post by Lixas »

i have a script for automatic images watermarking [features: image or text as a watermark in various image places- corners, center and so on...]. I've found it but didnt tested yet. It uses GD library, so i hope were will not be any problems with various hosts. If you realy need that, PM me and i'll search in my huge scripts collection and will send you to your mail ;)
Image
dbg92
Posts: 3
Joined: Tue Aug 08, 2006 12:15 pm

GD Library

Post by dbg92 »

You can use this code: I built it using the info at php.net

Code: Select all

<?php

header("Content-type: image/png");
$string = $_GET['text'];
$im    = imagecreatefrompng("images/button1.png");
$orange = ****($im, 220, 210, 60);
$px    = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);

?> 

header("Content-type: image/png"); this is the mime type of the image. You can change it to image/jpeg, image/gif etc.

$string = $_GET['text']; this is the text that goes on. It uses a $_GET (the index.php?text=hello kind of thing), but you can change it to what ever text you want to output

$im = imagecreatefrompng("images/button1.png"); this is the path to the image. You can change imagecreatefrompng to imagecreate if you aren't using a png. You have to change the uri to a width followed by a height if you do

Code: Select all

$im = imagecreate(100, 30);
$orange = ****($im, 220, 210, 60); this is the text colour. you change it using the RGB values (220, 210, 60).

$px = (imagesx($im) - 7.5 * strlen($string)) / 2; This finds the width of the given image, then halves it to centre the text. You can use a pixel value for the text location if you want:

Code: Select all

$px = 5;
uses 5 pixels

imagestring($im, 3, $px, 9, $string, $orange); this creates the image, using
  • $im the original image
  • 3 PHP built in font 3
  • $px the number of pixels across horizontally
  • 9 9 pixels from the top
  • $string the text string
  • $orange the font colour
and outputs the new image to the variable $im

imagepng($im); this outputs the image if it is a png. You could also use imagejpeg($im);, imagegif($im);, imagewbmp($im); etc.

imagedestroy($im); clears the image variable.

Hope that helps :D

Daniel
kainengland
Posts: 105
Joined: Wed Jul 26, 2006 9:16 am

Post by kainengland »

php
i need a php tutour any 1
no a link
Post Reply