Probleme legate de browserele mobile

Orice discutie care nu se isi are locul in alt forum. Zona off-topic.

Moderatori: cristi, icsfails, Moderatori

Avatar utilizator
Birkoff
Senior Member
Mesaje: 6380
Membru din: Joi Mar 18, 2004 2:34 pm
Localitate: Bucuresti
Contact:

Probleme legate de browserele mobile

Mesajde Birkoff » Mie Feb 14, 2007 9:55 pm

Sunt si eu curios, cei dintre voi care au facut pagini web compatibile si pentru browserele mobile (gen browserele de pe PDA, SmartPhone, TabletPC, etc) atat WAP cat si HTML, peste ce probleme ati dat?
Hai sa discutam aici despre asta, poate invatam cate ceva unii de la altii pe tema asta.


1) CMS, ERP, CRM, etc... (doar pentru clienti))
2) Portofoliu, servicii, contact, blog
3) Folositi aceasta clasa sql in proiectele voastre (open source)
4) Vrei un magazin virtual la cheie, usor de folosit, cu api-uri incluse pentru maximizarea vanzarilor si multe alte facilitati? Da un semn si discutam.

Pirahna
Senior Member
Mesaje: 5985
Membru din: Dum Aug 22, 2004 2:04 am
Localitate: la birou
Contact:

Mesajde Pirahna » Vin Feb 16, 2007 5:09 pm

Eu am dat peste problema clasica : aliniere aiurea pe diferite mobile.

E vorba de dimensiunile fonturilor si de numarul de linii de pe ecranul telefonului.

Ca sa faci ceva cat mai "la fel" pe toate telefoanele, ar trebui sa fie ceva cat mai simplu.

Pentru exemple poti sa te uiti la yahoo.com pe wap sau mobile.piry.net.
Dar referitor la asta, cum verifici daca e telefon mobil ? :D

whooper
Senior Member
Mesaje: 866
Membru din: Mar Apr 05, 2005 9:58 pm
Localitate: Toronto ON

Mesajde whooper » Vin Feb 16, 2007 6:49 pm

Cum adica cum verifici ?

Orice browser are un USER AGENT ID string, trebuie doar sa stii ce cauti.

Orice bowser trimite Accepted Types & Encodings .. deci stii ce sa trimiti inapoi. (e.g. text/html sau fara Applet-uri sau Frames catre blackberries .. si asa mai departe).

Exemple de "Windows CE" user agent ID strings:

Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; 240x320)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; 320x240)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda 2mini; PPC; 240x320)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda 2s;PPC;240x320; PPC; 240x320)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda II;PPC;240x320)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PIEPlus 1.2; PPC; 240x320)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PIEPlus 1.2; PPC; 240x320; SPV M2000; OpVer 5.12.2.141)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PIEPlus 1.3; PPC; 240x320; PIEPlus 1.2)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320) 4.01
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320; 240x320)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320; PIEPlus 1.1)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320; PIEPlus 1.2)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; MDA Compact/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1)
Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 176x220)

:) E simplu daca iti faci paginile cu CSS (lichide) cu dimensiuni dinamice si daca eviti frame-urile /Applet-urile.
Join The Forums - Time Well Wasted!

Marius_MF
PHPRomania Supporter
Mesaje: 7
Membru din: Mar Aug 11, 2009 12:23 pm

Mesajde Marius_MF » Vin Sep 11, 2009 7:04 pm

Am avut acum cativa ani o aplicatie care avea legatura cu browsere mobile.
Poate ajuta pe cineva identificarea lor :

<?php

// Check whether the browser/gateway says it accepts WML.
if(strpos(strtoupper($_SERVER["HTTP_ACCEPT"]),"VND.WAP.WML") > 0 || strpos(strtoupper($_SERVER["HTTP_ACCEPT"]),"VND.WAP.WMLC") > 0 || strpos(strtoupper($_SERVER["HTTP_ACCEPT"]),"VND.WAP.WBMP") > 0 || strpos(strtoupper($_SERVER["HTTP_ACCEPT"]),"VND.WAP.WMLSCRIPT") > 0)
{
$br = "WML";
}
else
{
$browser=substr(trim($_SERVER["HTTP_USER_AGENT"]),0,4);
if($browser=="Noki" || // Nokia phones and emulators
$browser=="Eric" || // Ericsson WAP phones and emulators
$browser=="WapI" || // Ericsson WapIDE 2.0
$browser=="MC21" || // Ericsson MC218
$browser=="AUR " || // Ericsson R320
$browser=="R380" || // Ericsson R380
$browser=="UP.B" || // UP.Browser
$browser=="WinW" || // WinWAP browser
$browser=="UPG1" || // UP.SDK 4.0
$browser=="upsi" || // another kind of UP.Browser ??
$browser=="QWAP" || // unknown QWAPPER browser
$browser=="Jigs" || // unknown JigSaw browser
$browser=="Java" || // unknown Java based browser
$browser=="Alca" || // unknown Alcatel-BE3 browser (UP based?)
$browser=="MITS" || // unknown Mitsubishi browser
$browser=="MOT-" || // unknown browser (UP based?)
$browser=="My S" || // unknown Ericsson devkit browser ?
$browser=="WAPJ" || // Virtual WAPJAG www.wapjag.de
$browser=="fetc" || // fetchpage.cgi Perl script from www.wapcab.de
$browser=="ALAV" || // yet another unknown UP based browser ?
$browser=="Wapa") // another unknown browser (Web based "Wapalyzer"?)
{
$br = "WML";
}
else
{
$br = "HTML";
}
}


if($br == "HTML")
{
// Force the browser to load the HTML file instead
header("Location: login.php?err=for_html");
exit;
}
?>


Înapoi la “Discuţii generale”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 6 vizitatori