Taking Screenshots of Websites with PHP

There are many command lines tools you can use to take a screenshots of a web page. See the list of tools here: in Windows, in Linux. The mentioned tools can be used on a from a php script using shell_exec function.

* If you are looking for taking screenshots programmatically in .NET – read the post Taking Screenshots of Websites with .NET Windows Forms.

Continue reading

Rails 3 Select Tag with List of Countries

This post is to assist to create a select tag in a view (HTML) with a list of countries.

The solution presented here:

– The countries are stored in a table in database. If you don’t want to have a table with countries in DB, you can easily modify the code below to have countries as an array in code.

– Helper to show a list of countries in select tag in HTML

 

You can find the whole solution on github.

Continue reading