Re: [PHP] cURL functions

2005-05-13 Thread Richard Lynch
On Fri, May 13, 2005 3:45 pm, Chris Bruce said: >> header("Content-type: image/jpg"); >> Header('Content-Disposition: attachment; >> file="tigershippingdashboard20050429.jpg"'); >> echo $ret; > > Did you try this Jason? When I try it, it just downloads the > getimage.php file with the binary co

Re: [PHP] cURL functions

2005-05-13 Thread Jason Wong
On Saturday 14 May 2005 06:45, Chris Bruce wrote: > > This should work: [code snipped] > Did you try this Jason? Yes, I've tried the code that I posted (using my own URL for the image), works for me. > When I try it, it just downloads the > getimage.php file with the binary content of the im

Re: [PHP] cURL functions

2005-05-13 Thread Chris Bruce
This should work: $ch = curl_init(); // create cURL handle (ch) if (!$ch) { die("Couldn't initialize a cURL handle"); } // set some cURL options $ret = curl_setopt($ch, CURLOPT_URL, "http://images.apple.com/home/2005/images/ tigershippingdashboard20050429.jpg"); $ret = curl_setopt($ch,

Re: [PHP] cURL functions

2005-05-13 Thread Jason Wong
On Friday 13 May 2005 23:19, Chris Bruce wrote: > I did look at your post on PATH_INFO which did not get me any closer to > the solution. At this point, I am just trying to get an image using > cURL and then force it to download to the computer. Here is the link: This should work: $ch = curl_ini

Re: [PHP] cURL functions

2005-05-13 Thread Chris Bruce
I did look at your post on PATH_INFO which did not get me any closer to the solution. At this point, I am just trying to get an image using cURL and then force it to download to the computer. Here is the link: http://205.207.224.90/getimage.php and here is the code: header("Content-type: image

Re: [PHP] cURL functions

2005-05-12 Thread Richard Lynch
On Thu, May 12, 2005 11:54 am, Chris Bruce said: > API. The problem is that the resulting image is being displayed as > binary characters in the browser instead of downloading to my computer. > Does anyone know how I can take the binary result and force it to > download as a JPG image? At a minim

Re: [PHP] cURL functions

2005-05-12 Thread Jason Wong
On Friday 13 May 2005 02:54, Chris Bruce wrote: > $ret = curl_setopt($ch, CURLOPT_HEADER, 0); Try enabling the above or ... > Does anyone know how I can take the binary result and force it to > download as a JPG image? ... send an appropriate header before dumping the binary data. -- Jason Wo