cvs: presentations / hack08.xml /slides/intro geo.php geoplanet.xml

From: Date: Fri, 12 Sep 2008 23:40:55 +0000
Subject: cvs: presentations / hack08.xml /slides/intro geo.php geoplanet.xml
Groups: php.pres 
Request: Send a blank email to pres+get-1501@lists.php.net to get a copy of this message
rasmus Fri Sep 12 23:40:55 2008 UTC Added files: /presentations/slides/intro geo.php geoplanet.xml Modified files: /presentations hack08.xml Log: Add a GeoPlanet slide http://cvs.php.net/viewvc.cgi/presentations/hack08.xml?r1=1.1&r2=1.2&diff_format=u Index: presentations/hack08.xml diff -u presentations/hack08.xml:1.1 presentations/hack08.xml:1.2 --- presentations/hack08.xml:1.1 Fri Sep 12 21:18:03 2008 +++ presentations/hack08.xml Fri Sep 12 23:40:55 2008 @@ -54,6 +54,7 @@ <slide>slides/intro/ws5.xml</slide> <slide>slides/intro/ws6.xml</slide> <slide>slides/intro/ws7.xml</slide> +<slide>slides/intro/geoplanet.xml</slide> <slide>slides/intro/oauth1.xml</slide> <slide>slides/intro/oauth2.xml</slide> http://cvs.php.net/viewvc.cgi/presentations/slides/intro/geo.php?view=markup&rev=1.1 Index: presentations/slides/intro/geo.php +++ presentations/slides/intro/geo.php <?php $appid = 'Gux4Z8LIkY1IKfVXnRcMegs3IjNfmUhl'; $url = 'http://where.yahooapis.com/v1/places.q'; if(!empty($_GET['loc'])) { $src = "http://where.yahooapis.com/v1/places.q"; $src.= "(".urlencode($_GET['loc']).');count=0'. "?appid=$appid&format=json"; echo '<pre>'.print_r(json_decode(file_get_contents($src),true),true).'</pre>'; exit; } ?> <html><head> <script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/utilities/utilities.js"></script> <script language="javascript"> var fN = function callBack(o) { var latlon = document.getElementById('output'); latlon.innerHTML = o.responseText; } var callback = { success:fN } function sendform(target,formName) { YAHOO.util.Connect.setForm(formName); YAHOO.util.Connect.asyncRequest('GET',target,callback); } </script> </head> <body> <form name="main" action="javascript:sendform('geo.php','main')"> Location: <input type="text" name="loc" /> </form> <div id="output"> </div> </body></html> http://cvs.php.net/viewvc.cgi/presentations/slides/intro/geoplanet.xml?view=markup&rev=1.1 Index: presentations/slides/intro/geoplanet.xml +++ presentations/slides/intro/geoplanet.xml <slide title="GeoPlanet"> <break lines="1" /> <link marginleft="5em" href="http://developer.yahoo.com/geo/"/> <example title="geo.php" filename="geo.php" hide="0" result="0" fontsize="1.5em" marginright="0em"/> <example title="" filename="http://pres2.localhost/presentations/slides/intro/geo.php" hide="1" result="1" marginright="0em" type="iframe"/> </slide>

« previous php.pres (#1501) next »