Google Maps para múltiplos domínios


/ Published in: PHP
Save to your folder(s)

possibilitar a leitura de cada chave específica do google maps para cada domínio respectivo à chave


Copy this code and paste it in your HTML
  1. <% url = Request.ServerVariables ("SERVER_NAME") %>
  2.  
  3. <% if url = "www.azure.net.br" or url = "azure.net.br" then
  4. chave = "ABQIAAAAWWXfeGdnpXVEWVt9X6jhwRSPNaVZ5kdqx-L0F4UdWbaE4W7EeBTtv4-1xMvsb76ndtHN7TYqCIspMA"
  5.  
  6. end if
  7. %>
  8.  
  9. <% if url = "www.azure.inf.br" or url = "azure.inf.br" then
  10. chave = "ABQIAAAAWWXfeGdnpXVEWVt9X6jhwRShotxHYEG3owc5OPbKWIl7isuB8RS7P_Qgbz5gJJqZ4fsYvu3j-dtdMQ"
  11. end if
  12.  
  13. %>
  14.  
  15. <% if url = "www.azuresi.com.br" or url = "azuresi.com.br" then
  16. chave = "ABQIAAAAWWXfeGdnpXVEWVt9X6jhwRTsk6yEMGG-zOHdXC2PhSbq7Xlc0hRnrNbJPglDQQoriGsn3QqsUk0XKA"
  17. end if
  18.  
  19. %>
  20. <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=<%=chave%>" type="text/javascript"></script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.