Jump to content

Recommended Posts

Hi Guys,

 

I am trying to disguise my php script as a .gif file for the purposes of a shopping cart. Basically, you click on the .gif which is placed on the page and it takes you to an image unless it has variables attached to it. Google use this for their checkout so I know this is possible. Does anyone have any ideas how I would go about doing this?

 

Thanks in advance, Jacob.

Link to comment
https://forums.phpfreaks.com/topic/254244-php-script-as-gif-image/
Share on other sites

It's not something malicious. Google use it, look.

 

http://checkout.google.com/buttons/checkout.gif?merchant_id=*************&w=180&h=46&style=white&variant=text&loc=en_US

 

That's a PHP script if it has variables attached to it. But if you just go to http://checkout.google.com/buttons/checkout.gif it's a .gif file.

 

I'm trying to do something like that.

Yeah, I did that but I don't get how you link an image to the php script. Because I'm presuming you rename the script something like script.php to script.gif but then how to you link the image to it?

 

You could utilize the imagecreatefromgif() function:

http://php.net/manual/en/function.imagecreatefromgif.php

Yeah, I did that but I don't get how you link an image to the php script. Because I'm presuming you rename the script something like script.php to script.gif but then how to you link the image to it?

 

You could utilize the imagecreatefromgif() function:

http://php.net/manual/en/function.imagecreatefromgif.php

 

Thank you. :)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.