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

Hello.

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.

<?php
  $mapImage = @imagecreatefrompng('http://mt0.google.com/mtn=404&v=w2.66&x=629&y=966&zoom=6&s=Galileo');
  header("Content-type: image/png");
  imagepng($mapImage); 
  imagedestroy($mapImage);
?>

Open in new window

jasgAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
lunadlConnect With a Mentor Commented:
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.
0
 
lunadlCommented:
Is this being hosted third party or are you hosting it yourself?
0
 
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.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
lunadlCommented:
Hmm I get page not found with it right now. Where is the interface you using to get to these images?
0
 
jasgAuthor Commented:
Hello.  Sorry the "?" was missing in the first post:

http://mt0.google.com/mt?n=404&v=w2.66&x=629&y=966&zoom=6&s=Galileo
0
 
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.

cyberwebservice
Experts Exchange Cleanup Volunteer
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
All Courses

From novice to tech pro — start learning today.