如何在文件中存储具有所需位置标记的地图?

I want to store a Google map in a file with the marker. In my code it displays well, but I am not able to store it in a file.

Here is the code:

$image='<div id="dvMap" style="width: 100px; height: 100px">';

echo $image;

$fp  = fopen('abc.png', 'w+'); 

fputs($fp, $image); 
fclose($fp); 
unset($image);

There is any javascript running on your client, that puts URLs and img tags to that div. However your php code on server side does not recognize what's going on on client side unless you explicitely arrange data transfers e.g. of that url data. All in all, I think g*** has an api, which might be better used here.