Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/01/2010, 03:03
albertrc
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
Busqueda ayuda con get browser

hago esto para no tener que editar en el php.ini porque hay hosting que no se puede

http://alexandre.alapetite.fr/doc-al.../index.en.html
esto ya lo tengo echo
Utilisation
Installation
1. Download the php-local-browscap module (1.4) and rename it php-local-browscap.php (2008-01-17)
2. Download php_browscap.ini from Gary Keith and rename it browscap.ini


tengo esto en indice y me salen los siguientes errores

Código PHP:
<?php
if (get_cfg_var('browscap'))
 
$browser=get_browser(); //If available, use PHP native function
else
{
 require_once(
'/var/www/html/php/php-local-browscap.php');
 
$browser=get_browser_local();
}
print_r($browser);
?>

Código PHP:
Warningsyntax errorunexpected $endexpecting ']' in ./browscap.ini on line 49 in /var/www/html/php/php-local-browscap.php on line 72

Warning
uksort() expects parameter 1 to be array, boolean given in /var/www/html/php/php-local-browscap.php on line 74

Warning
array_map() [function.array-map]: Argument #2 should be an array in /var/www/html/php/php-local-browscap.php on line 75

WarningInvalid argument supplied for foreach() in /var/www/html/php/php-local-browscap.php on line 78
stdClass Object 
( ) 


tendria que utilizar esta libreria pero no se como empezar
How to use this library


You just have to call the get_browser_local() function with:


$user_agent=null (implied)

The signature of the browser to be analysed. If this parameter is left to null,
then it uses $_SERVER['HTTP_USER_AGENT'].
$return_array=false (Implied)

When this parameter is activated, the function returns an array instead of an object.
$db='./browscap.ini' (Implied, not in the native function)

Allows specifying the path of the browscap.ini database,
otherwise assumes that it is in the current directory.
$cache=false (Implied, not in the native function)

Specify if the database can be kept in memory, to improve performances when querying this function more than once.
return

Returns an object (or an array, if asked to do so in the second parameter) with the capacities of the browser.

Última edición por albertrc; 22/01/2010 a las 03:11