Kavacky Posted September 16, 2007 Report Share Posted September 16, 2007 Baigi grūti pamēģināt abus variantus un paskatīties, kurš strādā, ne? A tev nejauši nav piemirsies kādu no user agentiem pielikt beigās? Man pat tajā sākotnējā skriptā pareizi nosaka WinNT 5. Link to comment Share on other sites More sharing options...
torrentz Posted September 16, 2007 Author Report Share Posted September 16, 2007 (edited) man <?php if (strstr($_SERVER['USER_AGENT'], 'Windows NT 5')){$os='Windows NT 5';} else {$os='Other';} print"$os<br/>"; $ua = $_SERVER['HTTP_USER_AGENT']; print"$ua"; ?> izvada: Other Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 Edited September 16, 2007 by torrentz Link to comment Share on other sites More sharing options...
cucumber Posted September 16, 2007 Report Share Posted September 16, 2007 Nu ja tev galigi nekas nesanak pamegini f-ju get_browser, tikai to vajaga ieslegt. For more get_browser Link to comment Share on other sites More sharing options...
Kristabs Posted September 16, 2007 Report Share Posted September 16, 2007 :D Moš ieraksti pareizi if (strstr($_SERVER['HTTP_USER_AGENT'], 'Windows NT 5')){$os='Windows NT 5';} Link to comment Share on other sites More sharing options...
Kristabs Posted September 16, 2007 Report Share Posted September 16, 2007 Vajag ieslēgt error_reporting, lai Notices rāda vienkārši un uzreiz būtu pamanījis kļūdu. Link to comment Share on other sites More sharing options...
torrentz Posted September 16, 2007 Author Report Share Posted September 16, 2007 (edited) Jobcik, kaa es vareeju nepamaniit :D Paldies Kristab otro reizi :P Edited September 16, 2007 by torrentz Link to comment Share on other sites More sharing options...
Recommended Posts