test your website in any browser without installing any of them

9 Browsers by jixi2000 on deviantART
Creation by ~jixi2000 on deviantART

All Web Developers/Designers need to test their Websites in several different versions of all the famous browsers to ensure compatibility with each one of them. Sometimes it’s almost impossible to have every version installed on your computer (e.g. multiple versions of Internet Explorer on Vista..).

A great solution to this problem came from Spoon. They created the Browser Sandbox, which allows you to run different versions of all the famous browsers in your computer, without having to install any of them. Only a tiny plugin needs to be installed and then you can run all the supported browsers without any other installation.

The list of browsers that are currently available:

  • Microsoft Internet Explorer 8
  • Microsoft Internet Explorer 7
  • Microsoft Internet Explorer 6
  • Mozilla Firefox 3.5
  • MozillaFirefox 3
  • MozillaFirefox 2
  • Apple Safari 4
  • Apple Safari 3
  • Google Chrome
  • Opera 10
  • Opera 9

The application is free, so why don’t you try it?

 

how to retrieve and display your latest tweet using PHP

Twitter 5 by jasonh1234 on deviantART
Creation by ~jasonh1234 on deviantART

Retrieving your latest tweet from twitter is a very simple process. First, you need to request your latest tweet from twitter using its API and then parse the xml response and select your tweet. It’s much simpler than it sounds!

It’s a useful bit of code to use on your site, and allows people to see whether you’re working, playing online bingo or out on the town without going through the motions of manually accessing your twitter page whilst browsing your site content.

You can request your latest tweet from twitter just by using a simple URL: http://twitter.com/statuses/user_timeline/YourUserName.xml?count=1. By replacing YourUserName with your twitter username, you’ll get an xml file containing your latest tweet (you can request more tweets by changing the “count=1” with the appropriate number of tweets) along with some information about your profile.

Using the following PHP code, you’ll get the content of the xml response to the $buffer variable:

$twitter_url = 'http://twitter.com/statuses/user_timeline/burnmind.xml?count=1';
$buffer = file_get_contents($twitter_url);

Now that you have the xml content, you just need to parse it so you can retrieve your tweet. Using SimpleXML, which is a PHP extension that allows users to easily manipulate/use XML data, the content is converted to a set of nodes. The $status variable holds the “status” node and then the $tweet variable gets the child-node named text, which is your tweet. Finally, the tweet is displayed using the echo command.

$xml = new SimpleXMLElement($buffer);
$status = $xml -> status;
$tweet =  $status -> text;
echo $tweet;

Simple, right?

You can also use an alternative way: how to store and retrieve your latest tweet from an XML file