Use JS:
document.location.href.indexOf('domain.com')
Or php:
$_SERVER['request_uri'];
Or something similar to find out the url and adjust the key?
2009/1/5 Art <[email protected]>
>
> How can I pre-check if my Maps API key is valid with a given URL?
>
> A user can access my site using an IP address in the URL, or by using
> the full domain name in the URL.
>
> My API key is registered to the domain name URL. When someone uses
> the IP address in the URL the map request fails with the famous "API
> key used was registered ..." message.
>
> Is there an API call I can use to pre-check if the map request will
> fail so that I can issue my own help message about the proper URL to
> use?
>
> An example code snippet would be appreciated!
>
> Shalom
>
> >
>
--
Bjorn Brala
----------------
GeoStart.nl- Google maps - Swis Webdesign
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---