Created
September 14, 2013 07:18
-
-
Save hassanjamal/6559583 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$browsers = array('firefox','chrome','safari','opera','msie'); | |
$browser = new stdClass(); | |
preg_match('#('.implode('|',$browsers).')(/| )([^ ]+)#i',$_SERVER['HTTP_USER_AGENT'],$match); | |
$browser->version = round((int)$match[3]); | |
$match = strtolower($match[1]); | |
foreach($browsers as $val) | |
{ | |
$browser->{$val} = ($match == $val ? TRUE : FALSE); | |
} | |
if($browser->safari || $browser->opera) | |
{ | |
preg_match('#version/([^ ]+)#i',$_SERVER['HTTP_USER_AGENT'],$match); | |
$browser->version = round((int)$match[1]); | |
} | |
$browser->webkit = ($browser->chrome || $browser->safari ? TRUE : FALSE); | |
var_dump($browser); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "laravel/laravel", | |
"description": "The Laravel Framework.", | |
"keywords": ["framework", "laravel"], | |
"license": "MIT", | |
"require": { | |
"laravel/framework": "4.0.*", | |
"way/generators": "1.0.*@dev", | |
}, | |
"autoload": { | |
"classmap": [ | |
"app/commands", | |
"app/controllers", | |
"app/models", | |
"app/database/migrations", | |
"app/database/seeds", | |
"app/tests/TestCase.php" | |
] | |
}, | |
"scripts": { | |
"post-install-cmd": [ | |
"php artisan optimize" | |
], | |
"pre-update-cmd": [ | |
"php artisan clear-compiled" | |
], | |
"post-update-cmd": [ | |
"php artisan optimize" | |
], | |
"post-create-project-cmd": [ | |
"php artisan key:generate" | |
] | |
}, | |
"config": { | |
"preferred-install": "dist" | |
}, | |
"minimum-stability": "dev" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment