Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Accessing Google Maps on a https site
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
rknall  
View profile  
 More options Aug 15 2006, 8:38 am
From: "rknall" <roland.kn...@aerie.at>
Date: Tue, 15 Aug 2006 05:38:35 -0700
Local: Tues, Aug 15 2006 8:38 am
Subject: Accessing Google Maps on a https site
Hello

I am developing a website using a https connection. Naturally the IE
would cry out about the non-secure objects on the screen, and if saying
no, he would not print the google map. Following Script in PHP solves
the problem, when the call to your maps JS script is handled as below:

Proxy:

<?php
    /** Everything after ? on the url line */
    $loadUrl = $_SERVER [ "argv" ] [ 0 ];

    /** Loading the content of the thing we got */
    $content = join ( '', file ( $loadUrl ) );

    /** Using it under test conditions on both http and https
connections, so we have to select here */
    $scheme = ($_SERVER [ "SERVER_PORT" ] == 80 ? "http" : "https");
    /** Building redirect path */
    $wwwpath = $scheme."://".$_SERVER [ "HTTP_HOST" ].$_SERVER [
"SCRIPT_NAME" ]."?";
    /** Replacing the content */
    $content = str_replace ( "http://", $wwwpath."http://", $content );
    /** Output */
    echo $content;
?>

Call in Site:
 <script
src="sslproxy.php?http://maps.google.com/maps?file=api&v=2&key={google_map_key}"
type="text/javascript"></script>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
rknall  
View profile  
 More options Aug 15 2006, 9:35 am
From: "rknall" <roland.kn...@aerie.at>
Date: Tue, 15 Aug 2006 06:35:01 -0700
Local: Tues, Aug 15 2006 9:35 am
Subject: Re: Accessing Google Maps on a https site
The version above is missing some critical information. It will load
ANY page, that uses this mechanism. So either you hardcode the urls
into the file and select them by parameter, or use something like:

    if ( ! substr_count ( strtolower ( $loadUrl ), "google.com" ) > 0 )
{
        header ( "Location: ".$loadUrl );
        exit;
    }

for loading only pages, which reference a google.com sub domain in any
form


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »