开发者

How to add cookie to request for PHP/GD imagecreatefromJPEG?

开发者 https://www.devze.com 2023-01-05 19:57 出处:网络
I\'m using PHP 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 开发者_JAVA技巧to get the image.

I'm using PHP 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 开发者_JAVA技巧to get the image.

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

Thanks


Use stream_context_set_default and the header option to send a cookie header.

0

精彩评论

暂无评论...
验证码 换一张
取 消