Foros del Web » Programando para Internet » PHP »

ayuda con get browser

Estas en el tema de ayuda con get browser en el foro de PHP en Foros del Web. 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 (permalink)  
Antiguo 22/01/2010, 03:03
 
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
  #2 (permalink)  
Antiguo 22/01/2010, 04:50
 
Fecha de Ingreso: enero-2005
Ubicación: Barcelona
Mensajes: 1.473
Antigüedad: 19 años, 3 meses
Puntos: 10
Respuesta: ayuda con get browser

Para que necesitas esa librería?

es un ejemplo online también da errores : http://alexandre.alapetite.fr/divers...x.php#browscap
__________________
"Cada hombre es el hijo de su propio trabajo"
Miguel de Cervantes Saavedra
"La experiencia es algo que no consigues hasta justo depués de necesitarla"
Laurence Olivier

Etiquetas: browsers
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:21.