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

  • SEARCH
  • Home
  • 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 7803401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:34:21+00:00 2026-06-02T01:34:21+00:00

i tried to make a PHP GD banner like a plugin to make users

  • 0

i tried to make a PHP GD banner like a plugin to make users copy and paste the image link and put in their websites, which worked ok so far for me, the problem is that when i load the image, other page content such as text , etc doesn’t show into the browser

here is my php code to draw the image

<?php
    header("Content-type: image/png");
    $string = $_GET['text']. '  Click Here';
    $im     = imagecreatefrompng("../../images/banner.png");
    $orange = imagecolorallocate($im, 0, 0, 0);
    $px     = (imagesx($im) - 1.5 * strlen($string)) / 2;
    $font = 'verdana.ttf';
    imagestring($im,50, $px, 45, $string, $orange);
    imagepng($im);
    imagedestroy($im);
        ?>

hint: i put this code at the top of the page to make the header work

now other html code is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>add plugin</title>
</head>

<body>
<h3>Select One or More Plugin to connect your website for your reservation</h3>

<h4>Just A Button</h4>
<br />
<p>Instructions</p>
<p>Copy this code and paste into your website</p>

</body>
</html>

can someone suggest any solution to overcome this problem ?

  • 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-06-02T01:34:23+00:00Added an answer on June 2, 2026 at 1:34 am

    hint: i put this code at the top of the page to make the header work

    That’s your problem. You’ve basically done the equivalent of opening an image file on your computer in a text editor and typing random characters at the end of the file. It’ll break the image, and you’ll never see the characters as they’re meaningless within image data.

    Your PHP code can’t return both image and HTML in one HTTP request. Instead, you can have two different PHP files, one for images, and one for HTML. Have the HTML include the image PHP via a standard <img src="image.php" alt="" /> tag.

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

Sidebar

Related Questions

I tried to make a dynamic SQL which gets all tasks for some users
I have some search page link: www.example.com/search.php?search=search_word , I am tried to make a
I tried to make php form script, which process data submitted by the user,
I tried to make a simple contact form via HTML and PHP but the
How do I make the following url forbidden in apache; main/index.php?site=ing I have tried
I tried to make an independent copy of an array but couldnt get one.
I tried to make ValidationAttribute which would check the database whether such an object.
hey guys how to make these php html links codes possible. i have tried
I have a web-site based on PHP, to which I would like to add
How to make red banner ad shown in the top of : http://forum.creditcardpaymentgateways.in/index.php same

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.