Stránka: 1 z 1
| [ Príspevkov: 8 ] | |
Autor | Správa |
---|
Registrovaný: 10.07.08 Príspevky: 190 Témy: 40 | 40 Bydlisko: BA |
existuje nejaka funkcia, ktora by zistila meno prehliadaca?... viem o $_SERVER('HTTP_USER_AGENT') ale to mi vrati dlhy string aj s inymi informaciami. Ja by som chcel iba meno, pripadne aj verziu browsera.
|
|
Registrovaný: 06.03.08 Prihlásený: 01.10.12 Príspevky: 1732 Témy: 15 | 15 Bydlisko: triminka@sp... |
$_SERVER['HTTP_USER_AGENT'] a z toho si vytiahni informacie. Ten string mozes dalej spracuvat a nic ti nebrani
_________________ Redeem the game of law! Despair the Billy, here are the morals! Come, relentless eraser rain, relentless eraser rain... |
|
Registrovaný: 21.01.07 Prihlásený: 29.03.20 Príspevky: 660 Témy: 53 | 53 | |
Registrovaný: 10.07.08 Príspevky: 190 Témy: 40 | 40 Bydlisko: BA |
no to get_browser() som skusal, ale nejak mi to nechce ist...
Citácia: Warning: get_browser() [function.get-browser]: browscap ini directive not set in C:\Program Files\wamp\www\index.php on line 13
toto mi stale hlasi... no a nejako to neviem prelozit..neviete plz niekdo co to znamena?
|
|
Registrovaný: 30.05.06 Prihlásený: 08.10.14 Príspevky: 1756 Témy: 35 | 35 Bydlisko: BA - WESTSIDE |
Citácia: Note: In order for this to work, your browscap configuration setting in php.ini must point to the correct location of the browscap.ini file on your system. browscap.ini is not bundled with PHP, but you may find an up-to-date » php_browscap.ini file here. While browscap.ini contains information on many browsers, it relies on user updates to keep the database current. The format of the file is fairly self-explanatory. Voľný preklad: Citácia: Aby to fungovalo, nastavenie browscap v php.ini musí odkazovať na umiestnenie browscap.ini vo vašom systéme. Browscap.ini sa k PHP nedodáva, ale je tu odkaz, kde by mala byť aktuálna verzia... Na tvojom mieste by som sa na to vykašľal, alebo to skúsil cez $_SERVER['HTTP_USER_AGENT'].
_________________
A. S. Tanenbaum píše: The terms LF, MF, and HF refer to low, medium, and high frequency, respectively. Clearly, when the names were assigned, nobody expected to go above 10 MHz, so the higher bands were later named the Very, Ultra, Super, Extremely, and Tremendously High Frequency bands. Beyond that there are no names, but Incredibly, Astonishingly, and Prodigiously high frequency (IHF, AHF, and PHF) would sound nice. |
|
Registrovaný: 10.07.08 Príspevky: 190 Témy: 40 | 40 Bydlisko: BA |
aha... tak dakujem za pomoc
Ale vy na vasich strankach nerobite nieco take ako statistiku najviac pouzivaneho prehliadaca? ako to riesite vy?
|
|
Registrovaný: 30.05.06 Prihlásený: 08.10.14 Príspevky: 1756 Témy: 35 | 35 Bydlisko: BA - WESTSIDE |
Cez Google Analytics, alebo inú podobnú službu. Poskytuje totiž informácie na ďaleko vyššej úrovni, nehovoriac o užívateľskom komforte (jednoducho sa len zaregistruješ a vložíš kúsok Javascriptu na každú stránku svojho webu).
_________________
A. S. Tanenbaum píše: The terms LF, MF, and HF refer to low, medium, and high frequency, respectively. Clearly, when the names were assigned, nobody expected to go above 10 MHz, so the higher bands were later named the Very, Ultra, Super, Extremely, and Tremendously High Frequency bands. Beyond that there are no names, but Incredibly, Astonishingly, and Prodigiously high frequency (IHF, AHF, and PHF) would sound nice. |
|
Registrovaný: 10.07.08 Príspevky: 190 Témy: 40 | 40 Bydlisko: BA |
no skusil som zo $_SERVER['HTTP_USER_AGENT'] vybrat iba nazov a verziu prehliadaca, ale iba pri exploreri, FF, opere a safari(tie mam nainstalovane). Pri safari som to trochu predlzil, aby mi napisal string v poradi nazov, verzia. Mozno je to trochu primitivne ale mne to asi bude stacit.
Kód: <?php $browser = $_SERVER['HTTP_USER_AGENT']; echo $browser."<br><br>";
$msie = StrPos($browser,"MSIE"); $ff = StrPos($browser,"Firefox"); $opera = StrPos($browser,"Opera"); $safari = StrPos($browser,"Safari");
if (ereg("MSIE",$browser)){ $nazov = substr($browser ,$msie, 8);} else { if (ereg("Firefox",$browser)){ $nazov = substr($browser ,$ff);} else{ if (ereg("Safari",$browser)){ $safari1 = StrPos($browser,"Version"); $safari2 = substr($browser ,$safari1); $safari3 = StrPos($safari2, " "); $safari4 = substr($safari2 ,0 ,$safari3); $safari5 = substr($browser ,$safari); $nazov = $safari5." ".$safari4;} else{ if (ereg("Opera",$browser)){ $nazov = substr($browser ,$opera, 10);}}}}
echo $nazov ."<br>"; ?>
|
|
Stránka: 1 z 1
| [ Príspevkov: 8 ] | |
|