Jul 20, 2008

Making A Sig With Php - just wondering how it works

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Making A Sig With Php - just wondering how it works

elrohir
I was just wondering how to make an image that uses stuff given to it by php, yet remains only an image - say I want the site's title in an image.

I believe it has something to do with putting an index.php inside a folder called image.png or whatever. Am I right?

thanks

Reply

rvalkass
This depends. PHP can generate any image it likes on the fly and create a PNG, GIF or JPG file. The reason a folder called something.png is required is becuase forums do not allow you to put PHP files as an image in your sig, so they can be made to believe that the folder is actually an image and they still see the output of index.php within that folder. Try looking in the tutorials sections here at Trap17, especially the graphics section, and you will see many tutorials on making PHP signatures.

Reply

Spectre
You can link to a PHP file as an image (eg. site.com/image.php), and the browser will treat it as an image provided the script sends it the correct header specifying the type of file it is - such as header('Content-Type: image/gif'). If your host supports it - which I belive Trap17 does, although I may be wrong (I don't have hosting here) - you can force a certain file to be treated as an image by way of a .htaccess file:

CODE
<Files image.gif>
ForceType application/x-httpd-php
</Files>


Thus, the file image.gif is in actual fact a PHP script, even though it has a .gif extension. Placing the index.php script in a folder called 'image.extension' may work, and it is mentioned in most of the dynamic signature tutorials I've seen on Trap17, but it is a little 'hackish' and certainly not the way to go if you can avoid it.

Reply

shadowx
This is one way of doing it and i think its the way that many of the dynamic sigs here work. The image is a link to a php script that simply writes some text onto an image background and sends it to the browser as an image.

http://uk2.php.net/gd

That site is all about the gd image library which you will need to install. Depending on what system you are using it might already be installed. To check just use phpinfo(); and check on the GD library area to see if its installed.

If not that link has another link where you can find the GD library.

Once installed and if you have read through that link above you should be able to take the first steps into image manipulation using PHP. Its not too difficult once youve practiced. Start by writing text onto a background and move on from there smile.gif
Notice from jlhaslip:
Edit to remove faulty bbcode

 

 

 


Reply

juice
It's like using the GD library to create an image like for an info image that displays your browser, IP, time, date and hits. The only problem is that not all hosts support it or even have it and I haven't tried it on trap's servers yet.

Reply

farsiscript
dear elrohir You must Use GD Fucn
i agree mr shadowx , yes you can find info at http://uk2.php.net/gd or search gd at php.net wbesite

Reply

Tsunami
made you a quick little example of how to do it..

http://tsunamicentral.trap17.com/index.php?pageid=imggen

it creates a image "on the fly" from the given text... hope you like

i can give you the code for a sig if you want >.< but im not sure if your just wanting an answer to your quesiton or if you actually want a dynamic sig

Reply

electron
Well i made one whole site for users who could enter their own text and then it shows a random image with a random text entered by the user.
I use around 23 images in random.

Also a very powerful tool in Apace is mod_rewrite rule that can show something like http://www.trap17.com/index.php?image=electron to:
http://www.trap17.com/electron.png

Thats one cool stuff i loved to play with.

Reply



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*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : making sig php wondering works

  1. How Would I Go About Making A Simple "counting" Script? - (3)
  2. Making Sure They Did Not Leave Any Required Fields Blank - (3)
    how to make sure they did not leave any required fields blank? CODE <?php
        include("config/config.inc.php");
        include("config/dbcon.php");     include("checksession.php");
                 if(isset($_POST['action'])){         $gname =
    $_POST['gname'];         $gemail = $_POST['mail'];
            $gmsg = $_POST['gmsg'];         $date =
    date("m.d.y"); $sql = "insert into tblg...
  3. Help Improving My Login Script Code - The code works okay...just not the authorization part (4)
    I have developed a piece of code /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
    alt="smile.gif" /> that is going to work as my login script for my website. I need some help making
    improvements and creating additional features. Here is my code: CODE <?php
    session_start(); $name = $_POST['username']; $password =
    $_POST['password']; $con =
    mysql_connect("localhost","myDbUser","myDbPassword");
        if(!$con)         {         die(&#...
  4. Making This Compatable With Trap17's Php - (2)
    ok, i have a php script that is not compatable with trap17's php (4.4.4) i believe it was made
    to run on php 5, if anyone could help, id really appreciate it, thanks /smile.gif"
    style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> function
    something($info) { $script = new mirc_script($info); $script->highlight();
    return $script->get_script(); } class mirc_script { private $data = array(); public
    $chars = array(); // By specifying TRUE for $beautify here you can save a bit a
    processing time rather...
  5. Making A New Bbcode For Smf 1.09 - (0)
    Im using SMF version 1.09 i would like to make a bbcode so that it shows mirc syntax highlighting
    (as i have an mirc based site) i have a php script that will do the highlighting, im just really
    not sure how to incoporate that with the forum. http://www.mirc.net/tye/mirc_script.phps is the
    link for the script, it is not mine, but made by tye of mirc.net thanks for the help. Ive asked on
    the simple machines forum but theres been absolutely no help, so if anyone here can help me out, id
    really appreciate it....
  6. Script Won't Work At Trap17 -- Version Differences? - But works flawlessly in my machine... (12)
    Here is the code: CODE <?php $data_array = array(); $data_array2 =
    array(); $file_name = "menu_data.txt"; $handle =
    @fopen($file_name, "r"); if (!$handle)  {     echo "File
    Handle Not Available For Use"; exit;         } while (($data = fgetcsv(
    $handle, 1000, ",")) !== FALSE) {         if ( (strpos
    ($data[2],"$page=")))     {
                        $data_array[] =  t...
  7. Error Importing Sql Query Via Php - Works in PHPmyAdmin (6)
    CODE     function sql()     {         $fp =
    fopen("sql.sql","r");         $sql =
    fread($fp,filesize("sql.sql"));         fclose($fp);
            return $sql;     } Thats $this->sql and here is the other source CODE
    function insert_sql()     {     if($_GET['insert'])  {
            $template = new template;         $db = new db;
            $db->connect();         $query = $this->sql();       ...
  8. Form Dosn't Submit In Opera - Works in IE and FireFox (1)
    My form dosn't submit, it works in IE and FF, its validated HTML 4.01 and all, Code:
    /**********************************/ /** Post Topic :: EvilBoard **/
    /**********************************/ /* Session Start */ session_start(); /* Start Submit Script */
    if ( isset($_POST )) { header("Refresh: 0; redirect.php?posttopic");
    define("RELOADED","YES"); } /* End Submit Script */ /* Include File::Header.php */
    include("include/header.php"); echo " "; /* If Script can't find SESSION user_name */ if (
    !$_SESSION ) { /* Echo :: Forbiden */ echo '...
  9. Just Wondering If Anyone Uses Vbulletin,vbadvanced & Photopost? - (3)
    Just wondering if anyone uses any of these 3 php plugins..? After moving to this hosting and
    uploading all my files i get this error Warning: str_repeat(): Second argument has to be greater
    than or equal to 0. in /home/imacul8/public_html/forums/modules/navigation.php on line 115 couldnt
    find any help on it on the vbulletin forums and it never happened before. Just wanting to know if
    anyone knows what might be causing this is how to fix it? also sometimes whilst browsing the admin
    control panel for photopost i get this error Fatal error: Call to a member function o...
  10. How To Make Oscommerce Work With Phpbb - making oscommerce work with phpbb (1)
    i'd like to make oscommerce work with phpbb.imean that any person register to phpbb is
    automatically regitered to oscommerce and vice versa. if you have any advice or idea that may help
    plz send it.(any help would be appricated)...
  11. Intranet Search Engine - Need help in making one! (4)
    Hmm.. I am assigned a work of doing a project in PHP to build a intranet search engine. Can any
    body help? Moving from Introductions to PHP Programming. Also edited the topic title &
    description. Please be more descriptive in title & description. And it will be nice if you can be
    more descriptive in your posts ...
  12. Blocking Pages & Making Ranks - (4)
    I would like to know how and where to put the code that would block certain pages so people could
    only get to them if they logged in. And I would like to have ranks on the site and when you get to a
    certain rank you get more options like being able to add members and stuff. And also. I would like
    some code for a news sytem for the homepage. Like where you have to be logged in to post something
    and only people with certain ranks will have access to it and only certain people can delete it. I
    would like to be able to make it so on the members page it displays members and y...
  13. Music In Php - i don't get how this works (4)
    Ok i went to a site to listen to music and instead of giving me some file with a mp3 extention they
    have .php with an id #. Like this.... http://www.emp3world.com/to_download.php?id=53465 i was
    wondering how would a person do this and what's the purpose of it? is it like for safety
    reasons?...
  14. Gasp! Something I Made Actually Works! - It does! (7)
    http://jemclan.trap17.com/other/something.php Use "annylei" for the name and "something" for the
    pass....



Looking for making, sig, php, wondering, works

Searching Video's for making, sig, php, wondering, works
advertisement



Making A Sig With Php - just wondering how it works



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE