help on image header

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
i have a web service and accessing it is done thru query string. how
to access a certain header field using php? the sample program i saw
was done in java and it goes like this:

String shortcutcode = connection.getHeaderField("ShortCut");
ByteArrayInputStream bis = new ByteArrayInputStream (imageBytes,
BufferedImage bim =;
bim = bim.getSubimage(0,0,bim.getWidth(),bim.getHeight()-12);

how to do the same in php?

Re: help on image header

shotokan99 wrote:
Quoted text here. Click to load it

Look at the $_GET array, i.e. $_GET['ShortCut'];

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: help on image header

can you give an example on how to do it?

Re: help on image header

Quoted text here. Click to load it


$shortcutcode = $_GET['ShortCut'];

Re: help on image header

actually here's how i did it:

$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $xmyurl);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);

$image = curl_exec($ch);

now where shall i insert "$shortcutcode = $_GET['ShortCut'];"? what i
am trying to do here is to get 2 separate data, which is the header
and the image. with the image no problem because i was able to make it


Site Timeline