At the end of 2008, Microsoft abandoned their old search API. While older applications continue to work, new AppID’s only work with the new V2.0 API. If you’ve created a new AppID, and wonder why none of the code samples you find on the Web work with it, now you know. It’s not hard to update code to use the newer (still in beta) V2.0 API, and we’ll do exactly that by updating our previous API search code. If you’ve used the old code, it’s quite simple to update to the new code. Just copy the file, and change one line in your PHP page — the new code requires PHP5, so be sure your server has PHP5 installed.
Recently in PHP Category
Using PHP for your XHTML web site is great, but if you’re not considering possible effects you could be violating Internet standards and reducing the usability for your users. You might not know your validated and tested XHTML is treated as “tag soup” by browsers, or that without sending the proper headers your pages caching ability is severely reduced, or perhaps some browsers (due to bugs) won’t cache your page at all. When using PHP with XHTML, several issues need to be considered.
Previously, we wrote about getting the browser default language in PHP. But so what? What can you do with it? In this article, we’ll use the previous code, and expand on it to create a page which can be automatically translated into many languages — with the help of the Google translator.
If you’re doing international (i18n or Iñtërnâtiônàlizætiøn) work (or just want to make your site available in several languages), you’ll likely need to determine the users default language in your PHP code to determine which language to serve up. Searching the web yields one common code piece frequently; unfortunately as you’ll soon see it may not give you the results you need as it ignores parts of the HTTP spec which may or may not be critical to the accuracy of the results.
One of the advantages of Movable Type over Wordpress comes from publishing static HTML files (fetching data from the database for each page request doesn't scale well). By creating static HTML files, round trips to the database are eliminated and your blog is more likely to handle sudden bursts of high traffic. How many times have you gone to a popular Wordpress blog and seen database errors like "too many database connections"?
