To do this, you need to do three things. First, make sure that there is at least one space at the beginning of your query addition. Second, urlencode the space+your query addition. And finally, just add it to the end of your q parameter, as below
$url="http://ajax.googleapis.com/ajax/services/search/web? v=1.0&q=".urlencode($my_search_query).urlencode(" filetype:pdf"); Jeremy R. Geerdes Effective website design & development Des Moines, IA For more information or a project quote: http://jgeerdes.home.mchsi.com http://jgeerdes.blogspot.com http://jgeerdes.wordpress.com [email protected] Unless otherwise noted, any price quotes contained within this communication are given in US dollars. If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! And check out my blog, Adventures in Web Development, at http://jgeerdes.blogspot.com ! On Apr 16, 2009, at 10:44 PM, [email protected] wrote: > > Hi All, > > Anybody know how to add setQueryAddition("filetype:pdf") when > requesting AJAX Search API from php > > Thanks > Hab > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-AJAX-Search-API?hl=en -~----------~----~----~----~------~----~------~--~---
