How to add cookie to request for PHP/GD imagecreatefromJPEG?
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.
精彩评论