cvs: presentations / openhack.xml /slides/intro sm1.xml
| From: | Rasmus Lerdorf | Date: | Sat, 09 May 2009 07:13:26 +0000 |
| Subject: | cvs: presentations / openhack.xml /slides/intro sm1.xml | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1567@lists.php.net to get a copy of this message | ||
rasmus Sat May 9 07:13:26 2009 UTC
Added files:
/presentations openhack.xml
Modified files:
/presentations/slides/intro sm1.xml
Log:
.
http://cvs.php.net/viewvc.cgi/presentations/slides/intro/sm1.xml?r1=1.2&r2=1.3&diff_format=u
Index: presentations/slides/intro/sm1.xml
diff -u presentations/slides/intro/sm1.xml:1.2 presentations/slides/intro/sm1.xml:1.3
--- presentations/slides/intro/sm1.xml:1.2 Mon Dec 8 07:52:28 2008
+++ presentations/slides/intro/sm1.xml Sat May 9 07:13:26 2009
@@ -4,16 +4,41 @@
<blurb>Indexing the semantic Web!</blurb>
-<example title="An hResume query" result="1"
fontsize="1.7em"><![CDATA[<?php
-$wsurl = 'http://search.yahooapis.com/WebSearchService/V1/webSearch';
-$appid = 'rlerdorf';
+<example title="An hResume query" result="1"
fontsize="1.4em"><![CDATA[<?php
+$url = 'http://boss.yahooapis.com/ysearch/web/v1';
+$appid = 'Gux4Z8LIkY1IKfVXnRcMegs3IjNfmUhl'; // Get your own, please
$q = urlencode("searchmonkeyid:com.yahoo.page.uf.hresume PHP");
-$x = simplexml_load_file("$wsurl?appid=$appid&query=$q&results=100");
-echo <<<EOB
-Showing {$x['totalResultsReturned']} of {$x['totalResultsAvailable']}<br>
+$views = "view=searchmonkey_feed,delicious_toptags,delicious_saves,language,keyterms";
+$x = simplexml_load_file("$url/$q?appid=$appid&format=xml&count=50&$views");
+foreach($x->resultset_web->result as $r) {
+ $tags = '';
+ if(isset($r->delicious_toptags->tags->tag)) {
+ foreach($r->delicious_toptags->tags->tag as $t) {
+ $tags .= $t->name.'('.$t->count.'), ';
+ }
+ $tags = trim($tags,', ');
+ }
+ $terms = '';
+ foreach($r->keyterms->terms->term as $t) {
+ $terms .= $t.', ';
+ }
+ $terms = trim($terms,', ');
+
+ $formats = '';
+ foreach($r->searchmonkey_feed->feed->adjunct as $a) {
+ $formats .= $a['id'][0].', ';
+ }
+ $formats = trim($formats,', ');
+ echo <<<EOB
+{$r->date} {$r->language} <a
href="{$r->clickurl}">{$r->url}</a><br>
+<p style="font-size: 12pt">
+Delicious saves: {$r->delicious_saves} Tags: $tags<br>
+Key Terms: $terms<br>
+Microformats: $formats<br>
+</p>
+{$r->abstract}<br>
+<hr>
EOB;
-foreach($x->Result as $ent) {
- echo "<a href=\"{$ent->Url}\">{$ent->Title}<br>\n";
}
?>]]></example>
http://cvs.php.net/viewvc.cgi/presentations/openhack.xml?view=markup&rev=1.1
Index: presentations/openhack.xml
+++ presentations/openhack.xml
<presentation
template="php2"
navmode="html"
titlecolor="#1111aa"
navbarbackground="url(images/trans-ffffff.png)"
logo1="images/php-med-trans-light.gif"
titlesize="2em"
navbarheight="4.1em"
>
<topic>PHP</topic>
<title>Hacking with PHP</title>
<location>London</location>
<date>May 9, 2009</date>
<speaker>Rasmus Lerdorf</speaker>
<url>http://talks.php.net/show/openhack</url>
<twitter>rasmus</twitter>
<slide>slides/intro/titlepage.xml</slide>
<slide>slides/hacku/ideas.xml</slide>
<!-- Architecture -->
<slide>slides/intro/phpjs_learn.xml</slide>
<slide>slides/intro/sx.xml</slide>
<slide>slides/intro/rss_flickr.xml</slide>
<slide>slides/intro/ws4.xml</slide>
<slide>slides/intro/php_js1.xml</slide>
<slide>slides/intro/php_js2.xml</slide>
<slide>slides/intro/yajax.xml</slide>
<slide>slides/intro/php_yui2.xml</slide>
<slide>slides/intro/php_yui3.xml</slide>
<slide>slides/intro/php_yui4.xml</slide>
<slide>slides/intro/php_yui5.xml</slide>
<slide>slides/intro/geoplanet.xml</slide>
<slide>slides/intro/yql.xml</slide>
<slide>slides/intro/yql2.xml</slide>
<slide>slides/intro/boss.xml</slide>
<slide>slides/intro/sm1.xml</slide>
<slide>slides/intro/sm2.xml</slide>
<slide>slides/intro/hacku_ref.xml</slide>
</presentation>