Nov 21, 2009

Forum Signature-image With Php - Use PHP to create an image in real-time

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

Forum Signature-image With Php - Use PHP to create an image in real-time

signatureimage
With interest I have read these Topics.

What I want to do with PHP is the following:
Signatue-image

This is the Forum Signature of my cousin,
who lives in Europe.

The image is generated in real-time.
(Refresh the page, and see for yourself)

My cousin refuses to tell me how he did this.
But I want to do the same thing, also with PHP.

Any ideas?

Greetings,
John.


Notice from microscopic^earthling:
This is NOT a tutorial and in future you should be more careful about where you're posting your threads. Moved to Programming > Scripting.

 

 

 


Comment/Reply (w/o sign-up)

miCRoSCoPiC^eaRthLinG
It's quite easy to do this actually. All you've to do is to get PHP to read your IP & whatever other Browser Stats you want and create a JPEG/GIF/PNG image dynamically and send it back to your browser. Here's a simple code that will display your IP address as an image.

CODE
<?php
$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);

imagefill($img_number,0,0,$backcolor);
$number = " Your IP is $_SERVER[REMOTE_ADDR]";

Imagestring($img_number,10,5,5,$number,$textcolor);

header("Content-type: image/jpeg");
imagejpeg($img_number);
?>


You simply need to add on whatever other stats and graphics you wish to include. Modify this code and save it as a .php file and you'll get the desired results.

If you want to see the sample output of this code, visit: http://codesample.microsys-asia.info/ipsig.php

 

 

 


Comment/Reply (w/o sign-up)

signatureimage
First:
Thank you for moving my post into the correct forum group.

Second:
Thank you for putting me on the right programming track.

Third:
Now that I know how to start, I will use my home test-server
to program the signature image.

Comment/Reply (w/o sign-up)

signatureimage
How I programmed my dynamic Forum Signature Image with PHP:
(See the Signature Image at the bottom of this post)




Part [1] Prepare the texts:

Job [1.1] Find the TCP/IP address of the surfer:

CODE
[tab][/tab]$SurferAddress = $_SERVER['REMOTE_ADDR'];


Job [1.2] Find the name of the Internet Provider of the surfer:

Job [1.2] Step [1.2.1] Find the name of the machine of the surfer:

CODE
[tab][/tab]$SurferHostName = gethostbyaddr($_SERVER['REMOTE_ADDR']);


Job [1.2] Step [1.2.2] Fetch the two last qualifiers (three if United Kingdom)

CODE
[tab][/tab]$x1 = strrpos($SurferHostName,'.');  // Find the LAST . in the host-name:
[tab][/tab]$Last = substr($SurferHostName,1+$x1);  // Take the LAST word:
[tab][/tab]$Rest = substr($SurferHostName,0,$x1);  // Take previous part:
[tab][/tab]$x2 = strrpos($Rest,'.'); [tab][/tab] // Find the NEXT-TO-LAST . in the host-name:
[tab][/tab]$NextToLast = substr($Rest,1+$x2);  // Take the NEXT-TO-LAST word:
[tab][/tab]$Rest = substr($Rest,0,$x2); [tab][/tab] // Take previous part:
[tab][/tab]$x3 = strrpos($Rest,'.'); [tab][/tab] // Take the NEXT-TO-NEXT-TO-LAST . in the host-name:
[tab][/tab]$NextToNextToLast = substr($Rest,1+$x3);[tab][/tab]// Take the NEXT-TO-NEXT-TO-LAST word:
[tab][/tab]$Rest = substr($Rest,0,$x3); [tab][/tab] // Take previous part:
[tab][/tab]if ($Last == 'uk')
 {
[tab][/tab] $SurferProvider = "$NextToNextToLast.$NextToLast.$Last";
 }
[tab][/tab]else
 {
[tab][/tab] $SurferProvider = "$NextToLast.$Last";
 }


Job [1.3] Find the name of the browser:

CODE
[tab][/tab]$BrowserInfo = $_SERVER['HTTP_USER_AGENT'];
[tab][/tab]if     (ereg("MSIE", $BrowserInfo))
 {
[tab][/tab] $SurferBrowser = "Internet Explorer";
 }
[tab][/tab]elseif (ereg("Firefox", $BrowserInfo))
 {
[tab][/tab] $SurferBrowser = "Firefox";
 }
[tab][/tab]elseif (ereg("Lynx", $BrowserInfo))
 {
[tab][/tab] $SurferBrowser = "Lynx";
 }
[tab][/tab]elseif (ereg("Opera", $BrowserInfo))
 {
[tab][/tab] $SurferBrowser = "Opera";
 }
[tab][/tab]elseif (ereg("WebTV", $BrowserInfo))
 {
[tab][/tab] $SurferBrowser = "WebTV";
 }
[tab][/tab]elseif (ereg("Konqueror", $BrowserInfo))
 {
[tab][/tab] $SurferBrowser = "Konqueror";
 }
[tab][/tab]elseif (ereg("Epiphany", $BrowserInfo))
 {
[tab][/tab] $SurferBrowser = "Epiphany";
 }
[tab][/tab]elseif (ereg("Gecko", $BrowserInfo))
 {
[tab][/tab] $SurferBrowser = "Mozilla";
 }
[tab][/tab]elseif ( (eregi("bot", $BrowserInfo)) || (ereg("Google", $BrowserInfo)) || (ereg("Slurp", $BrowserInfo))   || (ereg("Scooter", $BrowserInfo)) || (eregi("Spider", $BrowserInfo)) || (eregi("Infoseek", $BrowserInfo)) )
 {
[tab][/tab] $SurferBrowser = "Bot";
 }
[tab][/tab]elseif ( (ereg("Nav", $BrowserInfo))  || (ereg("Gold", $BrowserInfo))   || (ereg("Mozilla", $BrowserInfo)) || (ereg("Netscape", $BrowserInfo)) )
 {
[tab][/tab] $SurferBrowser = "Netscape";
 }
[tab][/tab]else
 {
[tab][/tab] $SurferBrowser = "a browser";
 }


Job [1.4] Find the name of the operating systeem:

CODE
[tab][/tab]if     (ereg("Win98", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "Windows 98";
 }
[tab][/tab]elseif (ereg("Windows 98", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "Windows 98";
 }
[tab][/tab]elseif (ereg("Windows NT 5.1", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "Windows XP";
 }
[tab][/tab]elseif (ereg("Windows NT 5.0", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "Windows 2000";
 }
[tab][/tab]elseif (ereg("Windows NT", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "Windows NT";
 }
[tab][/tab]elseif (ereg("Win", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "Windows";
 }
[tab][/tab]elseif ( (ereg("Mac", $BrowserInfo)) || (ereg("PPC", $BrowserInfo)) )
 {
[tab][/tab] $SurferOs = "Macintosh";
 }
[tab][/tab]elseif (ereg("Linux", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "Linux";
 }
[tab][/tab]elseif (ereg("FreeBSD", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "FreeBSD";
 }
[tab][/tab]elseif (ereg("SunOS", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "SunOS";
 }
[tab][/tab]elseif (ereg("IRIX", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "IRIX";
 }
[tab][/tab]elseif (ereg("BeOS", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "BeOS";
 }
[tab][/tab]elseif (ereg("OS/2", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "OS/2";
 }
[tab][/tab]elseif (ereg("AIX", $BrowserInfo))
 {
[tab][/tab] $SurferOs = "AIX";
 }
[tab][/tab]else
 {
[tab][/tab] $SurferOs = "a cool machine";
 }


Job [1.5] Find a cool message; always different:
TODO: in MySQL

CODE
[tab][/tab]$Text_Element[1]  = "NO Software Patents !";
[tab][/tab]$Text_Element[2]  = "More games !";
[tab][/tab]$Text_Element[3]  = "Perl rulez !";
[tab][/tab]$Text_Element[4]  = "Rexx rulez !";
[tab][/tab]$Text_Element[5]  = "ADA rulez !";
[tab][/tab]$Text_Element[6]  = "Python rulez !";
[tab][/tab]$Text_Element[7]  = "C++ rulez !";
[tab][/tab]$Text_Element[8]  = "Basic rulez !";
[tab][/tab]$Text_Element[9]  = "Java rulez !";
[tab][/tab]$Text_Element[10] = "JavaScript rulez !";
[tab][/tab]$Text_Element[11] = "ALGOL rulez !";
[tab][/tab]$Text_Element[12] = "COBOL rulez !";
[tab][/tab]$Text_Element[13] = "Delphi rulez !";
[tab][/tab]$Text_Element[14] = "Pascal rulez !";
[tab][/tab]$Text_Element[15] = "FORTRAN rulez !";
[tab][/tab]$Text_Element[16] = "Ruby rulez !";
[tab][/tab]$Text_Element[17] = "Eiffel rulez !";
[tab][/tab]$Text_Element[18] = "PHP rulez !";
[tab][/tab]$Text_Element[19] = "mySQL rulez !";
[tab][/tab]$Text_Element[20] = "SmallTalk rulez !";
[tab][/tab]$This_Second = date('s'); // "00" --- "59"
[tab][/tab]$Text_Index = 1 + (int)($This_Second/3);
[tab][/tab]$Random_Text = $Text_Element[$Text_Index];


Part [2] Create the Signature Image:

Job [2.1] Take a copy of the Template PNG Image that will serve as the background:

Job [2.1] Step [2.1.1] Determine the sizes:

CODE
[tab][/tab]$New_Width = 308;
[tab][/tab]$New_Height = 123;


Job [2.1] Step [2.1.2] Identify the Template PNG Image:

CODE
[tab][/tab]$Source_Image_Name = "template.png";


Job [2.1] Step [2.1.3] Create a copy the Template PNG Image in a memory structure:

CODE
[tab][/tab]$New_Image = ImageCreateFromPNG($Source_Image_Name) or die("Problem In Opening The Source Template Image");


Job [2.2] Write the 3 lines of text, and the 2 lines of signature, inside the new PNG image:

Job [2.2] Step [2.2.1] Determine the geometry --- in order to position correctly:

CODE
[tab][/tab]$Label_Width = 304;
[tab][/tab]$Label_Height = 55;
[tab][/tab]$Label_1_X_Offset = 2;
[tab][/tab]$Label_1_Y_Offset = 10;
[tab][/tab]$Label_2_X_Offset = 2;
[tab][/tab]$Label_2_Y_Offset = 26;
[tab][/tab]$Label_3_X_Offset = 2;
[tab][/tab]$Label_3_Y_Offset = 42;
[tab][/tab]$Sign_1_X_Offset = 2;
[tab][/tab]$Sign_1_Y_Offset = 82;
[tab][/tab]$Sign_2_X_Offset = 2;
[tab][/tab]$Sign_2_Y_Offset = 98;


Job [2.2] Step [2.2.2] Determine the colors to be used:

CODE
[tab][/tab]$Default_Color = ImageColorAllocate($New_Image, 0xFE, 0xFE, 0xFE);
[tab][/tab]$Label_Color = ImageColorAllocate($New_Image, 0, 0, 0);             // must already be in the palette !
[tab][/tab]$Sign_Color = ImageColorAllocate($New_Image, 151, 75, 51);          // must already be in the palette !


Job [2.2] Step [2.2.3] Determine the texts for the 3 text lines, and the 2 lines of signature:

CODE
[tab][/tab]$Label_Text_1 = "You are $SurferAddress at $SurferProvider";
[tab][/tab]$Label_Text_2 = "You use $SurferBrowser on $SurferOs";
[tab][/tab]$Label_Text_3 = $Random_Text;
[tab][/tab]$Label_Font = 2; // 1 = mono (too small) --- 2 = mono-in-thin --- 3 = 2-in-bold (too large)

[tab][/tab]$Sign_Text_1 = "Greetings,";
[tab][/tab]$Sign_Text_2 = "John";
[tab][/tab]$Sign_Font = 3; // 3 = mono-in-bold --- 4 = large-mono-in-thin (too large) --- 5 = 4-in-bold (too large)


Job [2.2] Step [2.2.4] Determine the sizes of the text lines, depending on font and content:

CODE
[tab][/tab]$Label_Text_1_Width = ImageFontWidth($Label_Font) * strlen($Label_Text_1);
[tab][/tab]$Label_Text_2_Width = ImageFontWidth($Label_Font) * strlen($Label_Text_2);
[tab][/tab]$Label_Text_3_Width = ImageFontWidth($Label_Font) * strlen($Label_Text_3);


Job [2.2] Step [2.2.5] Determine the place of the text lines: 3 centered, and 2 left aligned:

CODE
[tab][/tab]$Label_Text_1_X = $Label_1_X_Offset + ( ($Label_Width - $Label_Text_1_Width) / 2 );
[tab][/tab]$Label_Text_1_Y = $Label_1_Y_Offset;
[tab][/tab]$Label_Text_2_X = $Label_2_X_Offset + ( ($Label_Width - $Label_Text_2_Width) / 2 );
[tab][/tab]$Label_Text_2_Y = $Label_2_Y_Offset;
[tab][/tab]$Label_Text_3_X = $Label_3_X_Offset + ( ($Label_Width - $Label_Text_3_Width) / 2 );
[tab][/tab]$Label_Text_3_Y = $Label_3_Y_Offset;
[tab][/tab]$Sign_Text_1_X = $Sign_1_X_Offset;
[tab][/tab]$Sign_Text_1_Y = $Sign_1_Y_Offset;
[tab][/tab]$Sign_Text_2_X = $Sign_2_X_Offset;
[tab][/tab]$Sign_Text_2_Y = $Sign_2_Y_Offset;


Job [2.2] Step [2.2.6] Draw the text lines:

CODE
[tab][/tab]ImageString($New_Image, $Label_Font, $Label_Text_1_X, $Label_Text_1_Y, $Label_Text_1, $Label_Color);
[tab][/tab]ImageString($New_Image, $Label_Font, $Label_Text_2_X, $Label_Text_2_Y, $Label_Text_2, $Label_Color);
[tab][/tab]ImageString($New_Image, $Label_Font, $Label_Text_3_X, $Label_Text_3_Y, $Label_Text_3, $Label_Color);
[tab][/tab]ImageString($New_Image, $Sign_Font, $Sign_Text_1_X, $Sign_Text_1_Y, $Sign_Text_1, $Sign_Color);
[tab][/tab]ImageString($New_Image, $Sign_Font, $Sign_Text_2_X, $Sign_Text_2_Y, $Sign_Text_2, $Sign_Color);


Job [2.3] Write the new PNG image via http to the browser of the surfer:

CODE
[tab][/tab]header("Content-type: image/png");
[tab][/tab]ImagePNG($New_Image);


I hope that the comments explain what is going on
to produce the following result: (refresh to see the changes...)

Comment/Reply (w/o sign-up)

chiiyo
This is really cool! Question: Is this what J-sig does? Because everytime I see M^E's signature I'm like, I want one.... but there's no client for Mac for J-sig, so I might have to resort to making my own?

Comment/Reply (w/o sign-up)

signatureimage
Dear chiiyo,


After reading your post, I went to investigate J-sig.

Indeed, the creation of the J-sig image is probably done
in the same way as my prototype.

But where J-sig differs is in the data that J-sig displays:

First, the J-sig server script captures information
about the surfers's browser, just like my prototype does.

Second, the J-sig server script captures information
about the J-sig subscriber's own machine, and in order
to do so, the J-sig subscriber needs to install the J-sig
software on his/her PC.
This is in fact some sort of privacy intrusion, don't you think?


What I want to do now:
I need a PHP/mySQL hosting service, because my idea is
to use a mySQL database.

First, I will store in the mySQL database the texts that
are to be displayed inside the signature image.
This will have to be done for each user.

Second, I will have to write a PHP dialog that will allow
new users to subscribe to the signature image service,
and that will allow existing users to modify their texts.

Third, I will store in the mySQL database the hits on the
signature images, when a surfers displays the image.

Fourth, I will have to write a PHP script to draw an image
with the statistics of the hits on each user's signature image.
This chart image will function in the same manner as the
signature image itself, now that I know how to do that.

Fifth, I will store in the mySQL database the TCP/IP addresses
of all the Internet Service Providers in the world, together
with their Country-codes.
The raw data - in CSV format - is freely available on the Internet.
I have already programmed the SQL to load a mySQL
database with this information on my home test-server.

Sixth, I will modify the PHP that draws the signature image,
and the PHP that draws the hit-chart, and include the Country-code
of the surfers that view the signature images.
Just like J-sig does.


Now you see why I need a PHP/mySQL hosting service....

Comment/Reply (w/o sign-up)

chiiyo
Cool, sounds like you have a plan!

If I understand you correctly, if you actually set up this thing, you'd be able to offer the services J-sig offers without requiring people to download and install any software, is that correct? That'll be really cool, since currently J-sig only caters to people using Windows software, and that's really sad!

If you ever intend to set it up, and need graphics, just give a holler! People around here are very helpful in that. I should be able to hook you up with a few bases.

Comment/Reply (w/o sign-up)

chiiyo
By the way I was surfing through the Whatpulse Signature generation site (whatpulse.afraid.org) and they had a little section where they teach you how to do what you just did. I haven't read through the entire thing yet (I don't know PHP) but I'll just give the link here for other people interested in doing this but also like me, don't understand PHP...

http://whatpulse.afraid.org/how/

Comment/Reply (w/o sign-up)

signatureimage
Dear chiiyo,


Thank you for pointing us to the Whatpulse site.

I have picked up an idea for my hit-chart graph:
(point 6 in my previous post)

Originally I wanted to show a statistical graph
of all the hits on the user's signature image,
based on the Country-code of the surfers.
But now I will try to show also the Country-flags
on the chart, if I can find all of them.
But
QUOTE
Google is my friend !


I suppose that will be almost 250 flag images.



P.S. Sorry that you do not (yet) understand PHP.
Every computer language is easy,
with the reference books by your side...
and some friendly forum members on the 'net...

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Forum Signature Image Php Php Image

  1. How To: Make A Simple Php Forum System - (4)
  2. Dynamic Php Image And Better Php Code Question - (10)
    Im working on a dynamic image, can i put 2 images in same dynamic image, and can i make this code
    shorter? if ( $goal == 31 ) { $xp2 = ('14833'); } elseif ( $goal == 32 ) { $xp2 =
    ('16456'); } elseif ( $goal == 33 ) { $xp2 = ('18247'); } elseif ( $goal == 34 ) {
    $xp2 = ('20224'); } elseif ( $goal == 35 ) { $xp2 = ('22406'); } elseif ( $goal ==
    36 ) { $xp2 = ('24815'); } elseif ( $goal == 37 ) { $xp2 = ('27473'); } elseif (
    $goal == 38 ) { $xp2 = ('30408'); } elseif ( $goal == 39 ) { $xp2 = ('33648')...
  3. Dynamic Gd Image - (2)
    I dont know if someone already made a topic like this, however it's not hard to understand if
    you can php, as many know we need to start a php script with CODE and end with CODE ?>
    to make a image you need a image type, I choos .png because its much cleaner then .jpg CODE
    header("Content-type: image/png"); for the background for the image we need this code CODE
    $image = imagecreatefrompng("http://www.imagefilez.com/out.php/i252132_Userbar.png"); if we wont
    a text in the image we need a font color, we get our font color from HEX values ...
  4. Image Popup On Mouseover - (23)
    I need a script that does this: Lets say I have form with options...you surely know what that is...
    CODE Who do you wanna race?           Derbi Senda 50      Honda NS 50 R      Suzuki ZR
    50      Yamaha DT 50 MX      Aprilia RS 50      - ?         When i put my mouse over
    one of them i want a picture of bike on which your mouse is on to pop up... I hope you understand
    what i mean...i can't rephrase it to be more meaningful...i tried /wink.gif"
    style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />...
  5. Free Forum Hosting Type Script Help! - Free forum hosting type script help!!! (2)
    i want to make something like http://invisionfree.com/ that makes an dir with your phpbb 3 forum
    in it with an admin CP plz help i really want to make something like it!! i was thinking of coding
    my own with file handling but i'm not good at some of it like "when u click submit to register
    a forums it will move the phpbb3 file that leads to the users dir then it will rename the dir to
    your username so like my.site.com/username it might work" with the admin username and pass and
    admin's email it will open the config.php then edit all the data but it will ke...
  6. Need Help With Background Image... - (12)
    I want to add background image to all sites on my website but some include "foot.php" and "head.php"
    and some "footer.php" and "header.php" but all include "config.php" but i dont know in which should
    i put it....any help??...
  7. Php Forum Cookies - I need help on a php forum cookie. All suggestions welcome. (3)
    OK, I am making a forum in php (with a mysql database). It is much harder then I thought it would be
    but I have been getting along very well. I was just putting some finnishing things on it when I
    found a problem I couldn't figure out. All suggestions are welcome. Problem: I want my forum
    (like all forums) to remember what topics you have already read. I want to do this via cookies and
    at first I was think of having to topic ID to be saved in a string. Example (Cookie:
    %x%) x=the forum topic ID. Then to retrieve that data I would simply look for %x% inside the coo...
  8. Random Name Generator - For a fantasy RPG forum (2)
    Well, I did this particular piece of coding a few days back, and I forgot to display it to you all
    here at AstaHost. I have just started a fantasy RPG forum. The naming rules are pretty strict
    because it has to be based on a construted langage called Pasen. No matter how much I explained, I
    thought, it would be hard for a newbie to understand the syllable formation constraints. Hence, I
    wrote a script and put it at my Drupal powered site, that generates random names for the four races
    for both genders. http://www.WiseTome.com/name-generator-for-chaos-and-order I ...
  9. Php :: Image Pixel Per Inch And Conversion - Please Guide (1)
    Hi Masters I want soemone to let me know (maybe through a good tutorial and/or PHP Sample Code)
    the following : 1 - User will only allowed to upload images with minimum 120 and maximum 300 Pixel
    Per Inches 2 - User will only allowed to upload JPG images, however, if Gif / BMB / PNG / ETC is
    uploaded the script will convert that into jpg. 3 - If the Image's PPI is > 300 it will set
    to 300. Please guide . I know this can'y be done by GD it requires ImageMagick, Pleae help
    !!!!!!! ...
  10. Image Works With Php And Gd - (3)
    Hi I have a 1 Big map. What i want is that the user will enter the latitude and longitude. the
    script will show that location in the image. I know how to convert Image X,Y Coordinates into
    Latitide and Longitude and vise versa. But there point is that the image is 1000x1000 wide but i
    want to show only the particular region of that latitude / longitude in 300x300 image. means that
    the PHP script will CROP wht Image (1000x1000) to 300x300. That way, the script will be shoing the
    part of an image, not the whole image. please help !!...
  11. Php :: Adding Image Over Image - (5)
    Hi Masters & Champions. I want some help regarding putting and image over some location (x pixel ,
    y pixel) of an image. Here it is quite important to note that the mage which is Inserted over an
    image must be clickable. Like for example suppose i put T on an image DD then the T must be
    clickable. Please gudie as this is quite important for me . Thanks ...
  12. How Do I Resize An Image On The Fly? - (8)
    I was wondering how I would go about resizing an image from a databse without saving it to a file.
    CODE include("settings.inc.php"); $get_a=$_GET ; $get_b=$_GET ; $get_width=$_GET ;
    $get_height=$_GET ; $query="SELECT * FROM $get_a WHERE id='$get_b'";
    $result=mysql_query($query); $image=mysql_result($result,0,"coverimg");
    $size=mysql_result($result,0,"imagesize"); $type=mysql_result($result,0,"imagetype");
    header("Content-length: $size"); header("Content-type: $type"); echo $image; ?> Obviously the
    image I want to resize is $image. The page name...
  13. Script For Viewing A Random Image Needed - (3)
    While browsing the web, I bumped into a script that I could really use, since it's different
    from everything that I saw. Most scripts that view a random image contain a code that chooses an
    image, and then puts the part into the page itself. However, on the www.greenplastic.com web
    site (dedicated to Radiohead), in the top left corner there is a random image module. If you look at
    the code, here's what is used: CODE Now, how can a PHP script be an image, and what
    kind of script that is? If you do visit that URL , you don't get a normal page, b...
  14. Wordpress With Forum ? - (2)
    Is there any software or MOD that could integrate WordPress with a forum ? I mean the posts /
    comments / User DB. I know of a site that makes a script called XDForums , but it supports WP 1.5
    not 2.0 .. and i have the latest version of WP installed. Plus the site is taking loads of time to
    release a new version of the forum software. Does anyone know a MOD that could integrate PhpBB
    forums to wordpress with the user DB etc .. ?? or could someone be kind enough to code it ? Thankx
    Regards Dhanesh. ...
  15. How Do I Make PHP Based Image Gallery Like This? - Help Needed (20)
    is it possible to make a page in php, with a url like this:
    httq://www.mysite.com/viewer.php?http://www.mysite.com/galleries/01 (This is a sample link, read
    below) so that in what i change the last part the gallery will change with it? so that i just have
    to make one php-page and this page just shows all the imaes in the map thats in the url after the
    questionmark?? thanks,...
  16. Uploading Image Via Admin Menu? - (2)
    There's never much action in here. Here's a question for all you php guys out there.
    Here's what I want. Let's say I create a simple administration menu for someone to
    Add/Edit/Delete a record/item from a database. Now in the add function, let's say I want to
    store a URL to a image. Rather than having to go in and FTP that image up on the server, how could
    a person create a 'Browse' button and find that image on your harddrive, then create a
    script to upload the image to the server? Just wondering how to do it, or if it could be done e...
  17. Saving A Php Generated Image To The Server - Help Needed Please (5)
    I'm trying to create a script that will generate an image and send it back to the browser while
    saving the same image to the server. I'm doing this because the image should be dynamically
    generated but because of the load that would place on a server if the image happened to be requested
    frequently, I've decided to build in a means to serve the static version of the image most of
    the time. What isn't included here is the function that will check the age of the file in cache
    directory and serve the static image if it is less than an hour old. This isn...
  18. Php: Write Random Text As Image - Having problems, help needed! (3)
    I'm trying to create a script that writes text to an image. CODE header("Content-type:
    image/png"); $_phrases = array( "Test 1", "Test 2", "Test 3", "Test 4", "etc." );
    $_rand_phrase = $_phrases ; $_image = imagecreatefrompng("gmail.png"); $_user_width =
    imaagettfbbox(9,0,"tahoma.ttf",$_rand_phrase); $_x_value = (200-($user_width + 113)); $_color =
    imagecolorallocate($_image, 165, 164, 164); imagettftext($_image, 9, 0, $_x_value, 16, $_color,
    "tahoma.ttf", $_rand_phrase); imagepng($_image); imagedestroy($_image); I can't see what
    I'm doing w...
  19. Is It Possible To Create A String Image In Chinese - (0)
    CODE Using imageloadfont $im = imagecreate(50, 20); $black = imagecolorallocate($im, 0, 0, 0);
    $white = imagecolorallocate($im, 255, 255, 255); imagefilledrectangle($im, 0, 0, 49, 19, $white);
    $font = imageloadfont("04b.gdf"); imagestring($im, $font, 0, 0, "Hello", $black); imagepng($im); ?>
      This is an example for illustrating how to create a image including a string with a specific
    font. In the codes, a font named "04b.gdf" is loaded and the string is created according to the
    font. What is the font named gdf? I mean what's the limitation or specificatio...
  20. Script to allow only members to download media - from a forum/board.. How to do it ? (18)
    I didnt know where to post this so i posted it here I wanna to know where to find a script where
    people have to register at your forum to download media off your website and i also wanna know what
    it is called. ------------------------------------------------------------- Next time you make a
    post - please be more specific about the topic. It helps a lot if your topic describes your post
    content in brief rather than having a "Help me" - which could mean anything. More often this
    wouldn't pique the interest of the readers at all and your post will get very few respo...
  21. Random Image / Random Header - S.O.S. (5)
    im building a website, and i need some help i got 3 frames, navigation, top and main, but i want
    the top banner to have a new tagline with every refresh, just like the header, it dont really matter
    what coding it is, as long as it's not to weird /tongue.gif" style="vertical-align:middle"
    emoid=":P" border="0" alt="tongue.gif" />...
  22. How To Do The Security Confirmation - see it when i register forum (3)
    How to do the security confirmation. When i register this forum, i see this. The image contain
    numbers and user must be fill in the number in image....



Looking for forum, signature, image, php, php, create, image, real, time

See Also,

*SIMILAR VIDEOS*
Searching Video's for forum, signature, image, php, php, create, image, real, time
advertisement



Forum Signature-image With Php - Use PHP to create an image in real-time

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com