/** * array getLatLongFromAddress(int). * * Retrieves information about a given adress from the GoogleMaps API unless the given data is * found in function-result-cache. * * Example return: * return array( "lat" => "39.2866799", "lng" => "-76.619677", "state" => "MD", "city" => "Baltimore", "zip" => "21201", "street" => "300 W Pratt St", "streetName" => "W Pratt St", "streetNumber " => "300", ); */ function getLatLongFromAddress($address) { $secondsIn1Day = 86400; $daysIn1Year = 365; $secondsIn1Year = $secondsIn1Day * $daysIn1Year; // Call _getLatLongFromAddress() if there is no function-result-cache return call_user_func_cache($secondsIn1Year, '_getLatLongFromAddress', $address); // The function call_user_func_cache() is defined in FunctionResultCachingSupport.php }
<?php if (empty($_GET['ccontent'])) { exit('Error - Missing ccontent argument in request'); } // Get target URL $targURL = request_uri(); $targURL = substr($targURL, strpos($targURL, 'ccontent=') + 9); // Verify this site is not going to reject frames $targetsHeaders = call_user_func_cache(1814400, 'get_headers', $targURL, 1); if (!empty($targetsHeaders['X-Frame-Options']) && stripos($targetsHeaders['X-Frame-Options'], 'SAMEORIGIN') !== false) { header('Location: ' . $targURL); print "<script> document.location = '{$targURL}'; </script>"; exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" version="XHTML+RDFa 1.0" dir="ltr" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> <frameset resizable="no" rows="50px,*" border="0" frameborder="0"> <frame name="top" src="/ext-top?subject=<?php print htmlspecialchars($_GET['subject']); ?> &closeTo=<?php print $targURL; ?> " scrolling="no" style="border-bottom: 1px solid black;"></frame> <frame name="mainnav" id="mainnav" src="/goto?target=<?php print $targURL; ?>