Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4381770
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:41:30+00:00 2026-05-21T12:41:30+00:00

I am trying to print users personal data like name, email, phone number on

  • 0

I am trying to print users personal data like name, email, phone number on screen, using separate images, rather than printing out in clear text on page, thus getting cache possibly by Google. Trying to print like below:

Name – image with name text created on fly
Email – image with email text created on fly
Phoneno – image with number text created on fly

The code I have provided merges text into an image ie name, but only allows me to create one image to send back to browser, how can I try to get my script to send more than one image back to browser?

I have tried adding more parameters to my function function ‘create_image($name,$email,$number)’ but only prints one field to browser, perhaps something to do with header()?

<?php
//Send a generated image to the browser
$name="Bob";$email="bob@email.co.uk";$number="12345678901";
create_image($name);

function create_image($value)
{

    //Set the image width and height
    $width = 250;
    $height = 20; 

    //Create the image resource 
    $image = ImageCreate($width, $height);  

    //We are making three colors, white, black and gray
    $white = ImageColorAllocate($image, 255, 255, 255);
    $black = ImageColorAllocate($image, 0, 0, 0);
    $grey = ImageColorAllocate($image, 204, 204, 204);

    //Make the background black 
    ImageFill($image, 0, 0, $black); 

    //Add randomly generated string in white to the image
    //imagestring ( resource $image , int $font-(font size) , int $x-(from left) , int $y-(from right) , string $string , int $color-(font-colour) )
    ImageString($image, 5, 10, 3, $value, $white);

    //Tell the browser what kind of file is come in 
    header("Content-Type: image/jpeg"); 

    //Output the newly created image in jpeg format 
    ImageJpeg($image);

    //Free up resources
    ImageDestroy($image);
}
?> 

Thanks for any replies

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T12:41:32+00:00Added an answer on May 21, 2026 at 12:41 pm
    $name="Bob";$email="bob@email.co.uk";$number="12345678901";
    switch ($_GET['option']) {
        case 'name':
            create_image($name);
            break;
        case 'email':
            create_image($email);
            break;
        case 'number':
            create_image($number);
            break;
    }
    

    And call your script with scriptname.php?option=name

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to print every element inside a vector like this: vector<users>::iterator i; for(i
Im trying print Excel file data on a page. To do it i used
I am trying to print a report that contains a bar graph using the
I'm trying to parse JSON returned from a curl request, like so: curl 'http://twitter.com/users/username.json'
I'm trying to give users an ability to print asp.net gridview/listview report. Could anyone
I am trying to create some stats and need to print a users referal
I am trying to allow the users of my website, to upload images and
Trying to write a Lua script for Scite (something like lua-users wiki: Scite Comment
Im trying to print the realtime output based on user input for a search.
I'm trying to print out the date in a certain format: NSDate *today =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.