How to send cookie with image request

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Post Reply
Niro
Forum Newbie
Posts: 1
Joined: Wed Jul 07, 2010 4:14 am

How to send cookie with image request

Post by Niro »

Hello Experts,

I'm using gd to fetch an image from a remote server.
$res=imagecreatefromJPEG ($url);

I need to have a cookie set with a value along with the call to get the image.

Is this possible with GD?
How would I do that?

Thanks,
Niro
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: How to send cookie with image request

Post by greyhoundcode »

Cookies and GD are two very different areas. Use setcookie() or a framework equivalent.
Post Reply