Can't download a png map tile from google maps with php


If I try to download a map tile from the google servers with php, the ones that contain the satelite images download fine (the ones in jpeg).  But if I try to download the ones with the maps (in png), I get a "Forbidden 403" error.

If I include the url of the png image in a html img tag, the images shows up with no problem.
If I create the image with javascript the image comes up fine.
If I download the image with urldownloadtofile in delphi, the image downloads perfectly.
If I plug in the url in IE the image downloads fine.

I tried using two diferent hosts and get the same problem.

If I try with a different png image from another url the image downloads fine with the same php script.

Thank you.

  $mapImage = @imagecreatefrompng('');
  header("Content-type: image/png");

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Is this being hosted third party or are you hosting it yourself?
jasgAuthor Commented:
Hello. I am using two comercial hosts: yahoo and caracasstream also I have tried on my pc, same behavior on all three.

Thank you.
Hmm I get page not found with it right now. Where is the interface you using to get to these images?
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

jasgAuthor Commented:
Hello.  Sorry the "?" was missing in the first post:
I beleive this is a hotlinking issue with google prevenitng you from relisting it as your image from your server. It may be best if you just put the image in any of the other methods you mentuioned before. They don't want you to take the image and reprint it as yours, thats why all the other methods work and this one does not. Good Luck.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CWS (haripriya)Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: lunadl {http:#20862390}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Experts Exchange Cleanup Volunteer
Forced accept.

EE Admin
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.