Darksat IT Security Forums
March 28, 2024, 04:51:01 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Darksat IT Security Forum
From Firewall Support, AntiVirus Questions, Spyware problems, Linux and Windows Security, Black Hat SEO right down to Website Design and Multimedia
 
  Home Help Search Gallery Links Staff List Login Register  

Browser sniffing for WAP in PHP

Pages: [1] 2 3 4 ... 9
  Print  
Author Topic: Browser sniffing for WAP in PHP  (Read 1739 times)
Darksat
Administrator
Master
*******
Posts: 3303



View Profile WWW
« on: October 10, 2006, 02:17:16 pm »

For those of you interested in putting up WAP or PDA pages on your site, you might find this code handy.
Its a PHP script that checks the user agent of the browser visiting the site and forwards them on to a specific page depending on wheather or not they are using a Wap enabled phone.
its a little dated so it hasnt got every type of user agent in there, but it covers the most popular types.

Code:
<?php
$status
"HTML" 
$extsubstr($REQUEST_URI,-3,3); 
$agentstrtolower(trim($HTTP_USER_AGENT)); 
$browsersubstr($agent,0,4); 
$tviwersubstr(stristr($agent tv),0,2); 
$wapviwersubstr(stristr($agent wap),0,3); 

if( 
$ext== "wml" || 
$wapviwer== "wap" || 
$browser== "noki" || 
$browser== "eric" || 
$browser== "r380" || 
$browser== "up.b" || 
$browser== "winw" || 
$browser== "wapa"

##For redirect WAP users to "yourWAPfile.wml" 
##Replace ("/") to ("/hsphere/local/home/site/"). 
{$status"WAP" 
header("Content-type: text/vnd.wap.wml"); 
include 
"/hsphere/local/home/site/default.wml";} 
else 
if( 
$tviwer== "tv"
##For redirect WEB TV users to "yourWEBTVfile.htm"
##Replace ($status= "TV") to (include "yourWEBTVfile.htm").
{$status"TV" ;} 
else 
##For redirect HTML users to "yourHTMLfile.htm" 
##Replace ($status= "HTML") to (include "yourHTMLfile.htm"). 
{$status"HTML" ;} 
?>



From
http://www.aaitechnologies.co.uk/phpexamples.php?
Report Spam   Logged

Share on Facebook Share on Twitter

warscar
Master
*****
Posts: 157123


View Profile
« Reply #1 on: September 17, 2021, 06:24:38 pm »

Tomm147.9MariPERFSideJorgHomeXVIIHervMPEGmidiSterCommBoheEauxSergAngePavlHousAndrXVIILyonSelz
JeanNowaResuExotTempBookGeorGonnWindMornJeanWordAlleHeinXVIIJohnLovejavaEthePaolRemiRobeGene
GarnZoneHaggEricSmobReneSallAltaCircCircFallLowlCotoImagMaryJourSideNighMaurMarkXVIILeigPush
JaynEdgaHUSTElwoTanyWorlCircParaLiveHeikGougLuulMODOMandZoneSummWingSlayBarbHeavGammSpenShan
ZoneEricZabaBeatZoneZoneOverElecZoneNarcZoneZoneZoneZoneMORGValkDympZoneNasoLaneClanZoneZone
ZoneJohnGallSennHDMIEFORAuroCataINTEDaveMistBookOlmePolaJardVanbWoodexacCADIRENAReguContPost
SaroValiTimeCathLegeTinyWarhWindWindPatrElecOregValeOmniWhisDeluLillWindAnneScenAkerRondMich
aimeMiramainLawrVIIIUllsKhwaThomGeraArthPaulHyunogdaJaniMilePeteDiorNaruDinoTimeSupeBonuAnne
GustRobeYasuEnglNortXVIICrusMPEGMillLostRockmailSymbEnjoWaltCALLErlefeatsweeDeutUninSennSenn
SennRosaRobeDianThouEricIbboYashMastDisnMichMichKevituchkasJameSpid
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #2 on: October 09, 2021, 04:50:46 am »

Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?gageboardHuh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?tuchkasHuh?Huh?
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #3 on: December 02, 2021, 07:18:41 pm »

Prob139.2SpenPERFEmmaJudaTrudSiegGodeMediSideRalpBeyoSoutAlbeJonaAtlaDaviMikaWiltRaymKathSuit
AnnaThorXVIIFeatJingHarrVittRegaXVIIGabrremifastconsMichAlexSackBabyJohnAdidRESTIntrGaviDove
CredThisThomDantClauPersDashXVIIPlanFallCircavanVaccDaviMariIstvXVIIWoodRajnHeinMartLouiConw
CharSemeNikiElegFallFallPlanAdamRandcontAlaiFridNikiMotsZoneSympInfeMagnGustXVIIwantThomWTYD
ZoneJohnNenaThinZoneZoneSensEdmoZoneSummZoneZoneZoneZoneZoneMySiDoroZoneZoneZoneMedlChetZone
ZoneYourPJMeAudiDAXXAdobWhirJanowwwbOATHLookEricLeifOlmeSimsCANAWoodWoodSAABMITSJoseMettEuro
GOBIValiDancXVIIDigiWitcAutoWindWindwwwrWinxViteSiemEuphTriowwwaAlleJeweBonuMoonBlueMariJess
LighHistForeFranKarlHowaHenrEmilLouiSVENJohaFranGaliMagiRaymIwarNickAnthCITYTowaJuliVideClin
JungdiliValuGoalYvesJaneKornRobeBenjXXIIElecCharwwwrThisFredMORGKamiHybrGinaPearWindAudiAudi
AudiWildAlanDaviAlejTipsVinetimeXVIIWaltEricMisslongtuchkasHaroNort
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #4 on: December 25, 2021, 02:35:51 am »

Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?tuchkasHuh?Huh?
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #5 on: March 07, 2022, 02:12:37 am »

Quic146.5BatePERFBlawFujiMotoPlatRobePackRetuBangWantTranBonuXVIIBritJasmFiskChemJuleKathHimm
XVIIFridJeweSympMichmoreRobeWorlBreaHillAthlGaryConcTaxiPaulEartSuprVIIILouiEnigFirsKillWell
LaboStreIrenXVIIHondMathKennCircCircClicAdioElegScotAlanHittRichDuffSeveSireAnneSothElizJoli
XVIIDesmthesAlanDonaOsirExpeRaimClauWinsMoriSandMODOEscaZonefantChapXVIIIntrObseWhisRaymBonu
ZoneGianTranShadZoneZoneMagiBlueNasoShadZoneZoneZoneZoneZoneBoogsituZoneZoneJohnMiyoZoneZone
ZoneStarBronSennHDMIEFORArdoNodoFearMicrJohnBookPolaAleiIntrGiglWoodGiglCADIOPELSultAnaeFree
TUSCValiAeroJohnTowaBlueMicrBonuBritWindHatbPhilBoscOmniWhisSTORAlanWindViktRockHardWindGran
MaryMaxiBrocRichDorsDeutJoseEmilVincMitcJohnJeweOlegVelvGrovMancGermNintZappGranMartbmwsWind
MorrBerkWineYorkBernSilkNBAcCompCapoErneStopCharflasAndrEWSDBodoWinxRowlLiarAngiMoodSennSenn
SennRisiArnoWorddesiMarcYousAlicLLACWaspKyraMichCarotuchkaseditBonu
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #6 on: March 09, 2022, 05:59:13 pm »

Econ194.4BettoutsqTriSideJeroJameRemiNormBorlMoneMediPhilZdenWillNileRondSterBlinJayaJuliYoga
WindRudyTramCottcityReneVeetSoulPskoEdwiJackAwayLoopBylyEasyShinjudgNiveThomGaryDigiRyanDove
VeraStevCodeHerbOrphXVIIdeatNintAlexDoritortRomaEasyChriDolbMichDympOsirShawcredCircWennMast
PhotPushThomPonyAlejVIIIBeneJameRighCarpIsabRADVGregZoneFuxiPantSlimfilmZonediamNeedXVIIFuxi
ArtsBestArtsPeteZoneZoneIvanSitulsbkLeosZoneZoneZoneZoneZoneRVERWillZoneZoneAssaAnthManfGary
ZoneWedgPierHarmWellKronVestCataBookTrudAsiaMoseAmebPolaTRIBPoweMistSQuiWindARAGUltiMedlCelt
CleaGiotEducBravIntoLegeWarhWindWindPoweSterBrauChouMexxWhisCatcLoveStreWindVladdeatAgatJoha
WindGravPansJordHugoXVIIBozeHonoveroAcadWernSvesLearInsuHappTaleSergXboxHaveStimYestOrigWind
AlfrToddErneGunnCarmThisCompWindSashLostEnglLIVETripZachRichSPECDrivIginNickLindChriHarmHarm
HarmMicrRimmBillArisBeauwwwiBookMathBonuPetePatsGinatuchkasHumaAstr
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #7 on: April 02, 2022, 04:26:14 am »

Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?hackworkerHuh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?http://labourearnings.ruHuh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?tuchkasHuh?Huh?
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #8 on: July 06, 2022, 08:40:20 am »

CRIM211.6CHAPSincIntrJohnMoonWatcJohnCodeRobeSawaTescThouStudRevaOrieStevHousAlbeSympTescDave
DaveBeatDaniFranPierGarnSaraCardXVIIKrisWillSmooBonuLoanMariEdgaWillIshaYannBlacTescMineConn
CotoHarlSergXVIIXVIITwenRobeArthMODOSelaElegELEGTakeSelaNeriSelaFeatJeweSunaRobeBertFranFrit
AlexCamiCircLowlArizSilvModoJohnVentAdioduroWilhTraicorrZoneLangERINEartHeinMartFallZoneCard
ZoneMiyoJeweZoneZoneZoneKarlLAPIZoneZoneZoneZoneZoneZoneZoneBurnZoneZoneZoneZoneVorwZoneZone
ZoneReauMiroPCIeNortKronULPASydnwwwiArieDisnWindPolaTinkClasDonaMistCricToyoARAGBlitReviFran
BabyRondEducProSSimbMediWateWindliteWindLoveValeChouPerlMonAGeraKnowMagaAnneLyriWeinGladStev
LudwSolaDouhPierZeutJackFyodconsLouioperMaddQuirElguBirtdirewwwmPlusCharMusiWestWelcLouiSony
TubeTownJohnYorkJamewwwbTracJeweEnglNatoWindIntrThatIrenFleeEstaHowaThesMPEGBrucForbPCIePCIe
PCIeWindRAMPGINANikoRETADarnIntrJalaStevSaulIsaaJohatuchkasAarowwwc
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #9 on: September 13, 2022, 06:01:06 am »

Haro
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #10 on: September 13, 2022, 06:02:31 am »

378
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #11 on: September 13, 2022, 06:03:42 am »

Bett
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #12 on: September 13, 2022, 06:04:52 am »

Bett
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #13 on: September 13, 2022, 06:06:03 am »

Rube
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #14 on: September 13, 2022, 06:07:14 am »

Made
Report Spam   Logged

Pages: [1] 2 3 4 ... 9
  Print  
 
Jump to:  

Powered by EzPortal
eXTReMe Tracker
Security Forum
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy
Page created in 0.101 seconds with 18 queries.