xuanyinwen
xuanyinwen

Reputation: 73

php script for google maps

I am trying to create a google maps for mutiple domain the php script is below:

$my_google_map_keys = array('host1' => 'key1', 'host2' => 'key2');

$conf = array(
  'google_maps_key' => $my_google_map_keys[$_SERVER['HTTP_HOST']]
);

but I can't make it work after put on my heading. any one can help please?

sorry,

originally, I use the script below for the API keys which is working fine:

Now I want to use it for multiple domain, and replace by the php script, but it doesn't work. any idea what else should I do, or could you give me some idea how to update to V3.

Many thanks!!

Upvotes: 1

Views: 1717

Answers (1)

Luke Stevenson
Luke Stevenson

Reputation: 10341

You might want to upgrade to V3 of the Google Maps API - API Keys are no longer required.

The Google Maps Javascript API V3 - Basics

Upvotes: 3

Related Questions