Answers for "php in browser"

PHP
3

php get browser

function get_browser_name($user_agent){
    $t = strtolower($user_agent);
    $t = " " . $t;
    if     (strpos($t, 'opera'     ) || strpos($t, 'opr/')     ) return 'Opera'            ;   
    elseif (strpos($t, 'edge'      )                           ) return 'Edge'             ;   
    elseif (strpos($t, 'chrome'    )                           ) return 'Chrome'           ;   
    elseif (strpos($t, 'safari'    )                           ) return 'Safari'           ;   
    elseif (strpos($t, 'firefox'   )                           ) return 'Firefox'          ;   
    elseif (strpos($t, 'msie'      ) || strpos($t, 'trident/7')) return 'Internet Explorer';
    return 'Unkown';
}
echo get_browser_name($_SERVER['HTTP_USER_AGENT']);//Chrome
Posted by: Guest on February-27-2020
0

how to open php in browser

php -S localhost:8000
Posted by: Guest on January-15-2021
1

run a php site

php -S 127.0.0.1:8000
Posted by: Guest on July-12-2020
0

php in browser

echo Hallo
Posted by: Guest on January-05-2021

Browse Popular Code Answers by Language