A reconstruction os OS X in php and javascript