cURL / Mailing Lists / curl-library / Single Mail

curl-library

PNG Image resolution

From: Robert Ingoglia <ingogliar_at_felician.edu>
Date: Thu, 29 Dec 2011 22:29:44 -0500

Greetings,

I am very new to all of this, but if you fine folks would tolerate a “newbie,” I would be most appreciative.

To be very brief, I wrote my very first cURL script within a php file and uploaded it to my website:

<?php
     $curl = curl_init();
     curl_setopt ($curl, CURLOPT_URL, "http://www.cnn.com");
     curl_exec ($curl);
     curl_close ($curl);
 ?>

IT WORKS PERFECTLY! (sorry to shout, but I am ecstatic)

However, when I modify the name of the url (so that a grapic file with a png extension is “pointed to”):

<?php
     $curl = curl_init();
     curl_setopt ($curl, CURLOPT_URL, " http://water.weather.gov/resources/hydrographs/lodn4_hg.png");
     curl_exec ($curl);
     curl_close ($curl);
 ?>

…The picture does not show up (as a picture) but as gibberish:

‰PNG  IHDRXсï7c¿PLTEßßÿ -ŸŸÛÿÿÿg_·Â¿âI?©àßð¤ŸÔ+­›†ƲÌäØåñØðú²ãöÿrrÜ[fíglÿÆrܯfí»lÿÿrÜèfíólíøpÜònÝÝÝÃÃß­SS_oo77?‹‹Ÿ§§¿’’§ªªÃ007HHSaao}}yy‹@@ÿ\hüy‘ú•ºøNTý£Î÷j}ûµµåggöÉÉáSVþÏÏÿ‡¥ùSSú¢¢éççÿWWÿooÿ‡‡ÿflýŸŸÿ··ÿff¨Æäy8Š …

If I may just ask someone to tell me what I am doing incorrectly (nothing else but that), I would be thrilled.

Thanks!

Respectfully,

Dr. Robert Ingoglia
Professor - Department of History
Felician College
262 South Main Street
Lodi, NJ 07644
office: 201-559-6135 (voice mail available)
web page: http://faculty.felician.edu/ingogliar
Member of CWOP (Citizen Weather Observer Program)
Station: DW8219 at http://heightsweather.info

"What Orwell feared were those who would ban books. What Huxley feared was that there would be no reason to ban a book, for there would be no one who wanted to read one."

Neil Postman, Amusing Ourselves to Death, p. vii

______________________________________________________________________
This outgoing email has been scanned by the MessageLabs Email Security System for Felician College.
_____________________________________________________________________

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-30