index.php

Go to the documentation of this file.
00001 <?php
00002     /**
00003         \file satellite_server/standalone/index.php
00004         
00005         \brief This file demonstrates a "bare bones" BMLT Satellite Server implementation,
00006         using the BMLT_Satellite class.
00007         
00008         It is absurdly simple to use the BMLT_Satellite class to implement a standalone PHP
00009         BMLT satellite server.
00010     */
00011     
00012     /* The first thing that you need to do is to load the class, and intercept any AJAX calls. */
00013     
00014     /* We fetch the file that contains the client class. */
00015     include ( dirname ( __FILE__ ).'/BMLT_Satellite.class.php' );
00016     
00017     /* Create the BMLT Satellite object. Die if it fails. */
00018     if ( !(($bmlt_instance = BMLT_Satellite::MakeBMLT()) instanceof BMLT_Satellite) )
00019         {
00020         die ( 'The BMLT object could not be created' );
00021         }
00022     
00023     /*  This is optional, but should be done if you plan to support mobile phones.
00024         If you don't do this, then you need to provide your own DOCTYPE and <html> element, like so:
00025         
00026         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
00027             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
00028         <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
00029     */
00030     echo ( $bmlt_instance->Execute ( 'doctype' ) );
00031 ?><head>
00032         <!-- This is the character encoding meta tag. You should always provide it for validation. -->
00033         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
00034         
00035         <!-- These should be provided for implicit inline scripting and styles. -->
00036         <meta http-equiv="Content-Script-Type" content="text/javascript" />
00037         <meta http-equiv="Content-Style-Type" content="text/css" />
00038         
00039         <!-- This is necessary for Google Maps. It tells IE 8 to act like IE7. -->
00040         <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
00041         
00042         <title>Standalone BMLT Satellite Server</title>
00043         
00044         <!-- These styles are simple "Wipe the slate clean" styles. -->
00045         <style type="text/css">
00046             /* <![CDATA[ */
00047             /**
00048                 This is just some "blanket" CSS that sets things to a common margin and padding (none).
00049             */
00050             *{ margin: 0; padding: 0 }
00051             
00052             /**
00053                 This ensures that the map will fill the page in all browsers.
00054             */
00055             body, html{ width:100%; height:100% }
00056             /**
00057                 This restricts the map to a 640-pixel square. Adjust the height and width to your taste.
00058                 Making them 100% should fill the container.
00059             */
00060             #c_comdef_search_results_map_container_div
00061                 {
00062                     position:relative;
00063                     width: 640px;
00064                     height: 640px;
00065                 }
00066             /* ]]> */
00067         </style>
00068         
00069         <!-- This is where all the head scripts and styles are obtained from the root server. -->
00070         <?php echo ( $bmlt_instance->Execute ( 'head' ) ); ?>
00071     </head>
00072     <body>
00073         <!-- This is where the body text is obtained from the server. -->
00074         <?php echo ( $bmlt_instance->Execute ( ) ); ?>
00075     </body>
00076 </html>
 All Data Structures Files Functions Variables Enumerations