¡@¡@¡@ Response.Flush ¡@¡@¡@ Response.End %> 43. ¡@¡@¡@WML¡@Àtí}ASP Session¬Þ¡@ ¡@¡@¡@¡@¡@¡@¡@á¡@¡@ø¹¡@æò¡@¶]Ïü¡@®aÄýSession¡@SessionÖv÷ç¡@¡@¡@¡@PC¡@¡@¡@cookies¡²¡@¡@¡@Íg¡@WAP¡@ºÙ¡@¡@¡@¡@cookies¡²¡@¡@¡@¡@¡@¡@¡@¡@ºÙ¢QWML¡@¡@¡@¡@¡@cookies¡²¡@ 44. WAP¡@¡@Session¬Þ¡@ ¡@HTML¡@¡@¡@¡@¡@¡@ª¤¡@¡@¡@¡@í~¡²¡@¡@¡@¡@ÚuâòÖv¡@¡V¡@¡@¡@¡@¡@¡@¡@¡@session¡²¡@¡@¡@£V¡@¡@Öv¡@¡@¡@¡~¡@¡@êÌ¡@¡@¡@¡@cookies£¤Àtí}¡@¡@ò~£nWAP¡@¤à¤èïþ¡@£V¡@¡@¡@¡@session¡@¡@í~¡@¤æ¡@¡@¡@¡@¡@£D£¤¡@í~¡@ Alex Kriegel Å÷£¢¡@¡@¡@¡@§ý¡@ WAPlinks¡@Custom Session Object¡@¡@¡@¡@zip¡@¡@¡@¡@¡@¡@VBºN¡@¡@¡@¢QÚñ¯a¡@¡@Dll¡@¡@¡@Á{£V¡@»Ô¡@¡@¦¡@¡@£v¡@¡@¡@http://www.waplinks.com/customsessionobject.zip¡@§ó¡@ ¡@¡@¡@¾P¡@ÚuÖv£~¡@ PHPlib ¡@¡@Öv£~¡@ PHP Úñøý¡@¡@ Tarique (tarique@nagpur.dot.net.in) Å÷£¢¡@¡@¡@£~¡@PHPlib£¤¼Q¿Ò¢Q¡@í~¡V¡@WAP¡@¡@¡@£V¡@»Ô¡@¡@¡@¢Q¡@·ü¡@¡@¡@¡@¡@¡@¡@¡@§ó¡@ http://wap.colorline.no/wap-faq/archive/phplib_wml.zip 45. ¡@¡@¡@WAP¡@£~¡@Cookies¬Þ¡@ ¡@í~¶¥¡@Öv¡@¡@¡@¡@¡@¡@Öv¡@£V¡@WAP¡@ºÙ±`¡@¡@¡@¡@¡@¡@¡@Úu£¤«ëí~¡@§þÖv£~¡@¯d®È¡@fields¡@¡@¡@¡@§þ§¨îÅ¡@¡@¶¥ÖvPOST¡@¡@GET¡@£D¡@¡@ 46. WAP¡@¡@Cookies¬Þ¡@ ª¤¡@¡@HTTP CookiesÖv¡@¡@WAP¡@ÐR¡@£¤Àtí}¡@¡@¡@¶¥¡@¡@Íg¡@¡@¡@¡@¡@Cookies¡@¡@¡@¡@í¯£¤í¯¡@¡@Àt®¬¡@Phone.com¡@ UP.LinkçS»Ô¡@¡@¡@¡@¡@¡@¡@¡@£V¡@·é¡@¤B¡@¡@ ¡@¡@£~¡@¡@¡@¡@¡@¡@¡@¡@®ö¥NCookie-support¡@¡@ http://wap.colorline.no/wap-faq/apps/cookietest.php3 ¡@¡@¡@http://wap.colorline.no/demos.html¡@¡@¡@¡@¡@¡@ ¿Ø§÷¡@£[¡@¡@¡@¡@¡@¡@¡@¡@Â~p³ºµÜÆB¡@0¡@¡@£V¡@Cache±`Ïê»Ô¶W¡@¡@¡@¡@¡@¡@URL¡@¡@¼f¡@¡@¡@¶]Ïü£¤¡@¡@¡@¡@¡@§ó¡@帡@¡@±Y¡@¡@¾P¡@¡@¡@§ó§ÖÚu¡@¡@¿ØíåÁñ¡@¡@ð@pÖ³¾X¡@¡@¡@¡@¡@¡@¡@§ó¡@¡@¡@âò¡@£[¡@í}¡@¡@¡@Â~p³º¶]£K1¡@ ¡@¡@¡@¡@¡@Cookie¡@¡@¡@Ïê¼K·t TestCookie¡@¡@£V¡@¡@¡@¡@¡ëÂW¡@¡@¡@¡@¡@ßM¡@¡@¡@¡@£¤Ú¨¡@Â~p³º¡@¡@¡@Öv¡@¡@£[¡@p¡@¡@¡@ðE¡@¡@¡@£~¡@¡@¡@¡@£[Ïî«ô¡@£~¡@¡@WAP¦O¬E¡@§²¡@¡@ªµ¡@¡@¡@¡@p¡@¡@0¡@ ¡@ÏÄÂ~p§ý¡@¡@¡@±`Öv0¡@¡@¡@cookie âò¡é£V¡@¨{¡@¡@¡@¡@Web Server¡@¡@¡@¡@¡@¡@¡@¡@¡@CookieÖv¡@Ïê¨{¡@¡@ ¡@¡@¡@¡@¡@¡@¡@¡@§²Á{³¡@HTTPò³¡@¡@HTTP_VIA ¢Q HTTP_USER_AGENT ¡@¡@£v¡@Âé¡@¡@¡@£~¡@¡@çS»Ô¢Q®a£D¡@¡@£vçS»Ô£~¡@HTTP_VIS§¨îÅ¡@¡@¡@£n¡@¡@¡@£v£~¡@HTTP_USER_AGENT¡@Á{£V¡@£vªµµ\¡@¡@¡@Úu¡@ÖË¡@ ¡@¡@Öv¡@¡@PHP¡@Úò¡@¡@¡@§¨¡@¡@ PHP setcookie() £¸p¡@£V¡@¡@¾P¡@¡@¡@¡@¡@¡@¡@¡@í}¡@£¸p¡@Öv¸¸¦ä¡@¡@¡@cookie¡@¡@¡@PHP¶]Ïü $HTTP_COOKIE_VARS ¡@£¤§Ë¡@cookie¡@ <? if(isset($HTTP_COOKIE_VARS["TestCookie"])) {// Check if TestCookie is set ¡@¡@¡@¡@¡@ $cookieset = "set"; // Read the Cookie ¡@¡@¡@¡@¡@ $cookieid = $HTTP_COOKIE_VARS["TestCookie"]; ¡@¡@// and increase its value ¡@¡@¡@¡@¡@ $cookieid++; ¡@¡@¡@ ¡@} ¡@¡@¡@ else { ¡@¡@// cookie was not set ¡@¡@¡@¡@¡@ $cookieset = "not set"; ¡@¡@// start counter at zero ¡@¡@¡@¡@¡@ $cookieid = 0; ¡@¡@¡@ } ¡@¡@// apply the Cookie to the HTTP header ¡@setcookie("TestCookie",$cookieid); ¡@¡@// set the content type for WML ¡@¡@¡@ header("Content-type: text/vnd.wap.wml"); // disable ALL caching ¡@¡@¡@ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); ¡@¡@¡@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); ¡@¡@¡@ header("Cache-Control: no-cache, must-revalidate");¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@ ¡@¡@¡@ header("Pragma: no-cache");¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@ ¡@¡@¡@ echo("<?xml version=\"1.0\"?>\n"); ¡@echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" ¡@\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n\n"); ¡@echo("<!-- This application attempts to test the capabilities of a WAP gateway to support ¡@¡@¡@¡@cookies -->\n"); ¡@¡@¡@ echo("<!-- App by Espen.Lyngaas@colorline.no (c) 2000 -->\n"); ¡@¡@// Generate random value for reload forcing ¡@¡@¡@ $random = mt_rand(100000,999999); ¡@?> ¡@ <wml> ¡@ <head> // Even more cache disabling <meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>¡@ ¡@ </head> ¡@ <card id="init" title="CookieTest"> ¡@ <p> ¡@¡@ Cookie "TestCookie" was <?echo($cookieset)?>. ¡@¡@ Value is currently "<?echo($cookieid)?>" ¡@ </p> ¡@ <p> <anchor> Increase value <go method="get" href="<?echo($PHP_SELF)?>?random=<?echo($random)?>"/> </anchor> </p> <p>Gateway:¡@ ¡@ <? ¡@¡@¡@ if(isset($HTTP_VIA)) { // Is there something in the HTTP_VIA variable? ¡@¡@¡@¡@¡@ echo($HTTP_VIA); ¡@¡@¡@ } ¡@¡@¡@ else { ¡@¡@¡@¡@¡@ if(isset($HTTP_USER_AGENT)) { // Is there something in the HTTP_USER_AGENT variable? ¡@¡@¡@¡@¡@¡@¡@ echo($HTTP_USER_AGENT); ¡@¡@¡@¡@¡@ } ¡@¡@¡@¡@¡@ else { // Absolutely no identifier was found ¡@¡@¡@¡@¡@¡@¡@ echo("Unknown"); ¡@¡@¡@¡@¡@ } ¡@¡@¡@ } ¡@ ?> ¡@ </p> ¡@ </card> ¡@ </wml> 47. ¡@¡@£~¡@WAP¡@ºÙ¬é¡@E-Mail¡@ ¡@HTML¡@£V¡@¡@¡@ÓI¡@E-Mail¼f¡@¡@¡@ mailt¡² ¡@¡@¡@WML¡@¡@¡@£~¡@¡@¡@E-Mails¡@¤æ¡@¡@WML¡@¦ä£¤µz¢A¡@££¡@¡@ <wml> ¡@¡@¡@ ¡@<card id="edit" title="Email Editor"> ¡@¡@¡@¡@¡@ <p>From: <input type="text" name="from" format="*M"/></p> ¡@¡@¡@¡@¡@ <p>T <input type="text" name="to" format="*M"/></p> ¡@¡@¡@¡@¡@ <p>Subject: <input type="text" name="subject" format="*M"/></p> ¡@¡@¡@¡@¡@ <p>Message body: <input type="text" name="body" format="*M"/></p> ¡@¡@¡@¡@¡@ <p> ¡@¡@¡@¡@¡@¡@¡@ <anchor>Send this mail ¡@¡@¡@¡@¡@¡@¡@¡@¡@ <go method="post" href="http://some.host/mailhandler"?action=send/"> ¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@ <postfield name="from" value="$(from)"/> ¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@ <postfield name="to" value="$(to)"/> ¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@ <postfield name="subject" value="$(subject)"/> ¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@¡@ <postfield name="body" value="$(body)"/> ¡@¡@¡@¡@¡@¡@¡@¡@¡@ </go> ¡@¡@¡@¡@¡@¡@ </anchor> ¡@¡@¡@¡@¡@ </p> ¡@¡@ </card> </wml>¡@ ¡@¡@Úò¡@¡@http://some.host/mailhandlerÖv¡@¡@CGI¡@¡@¡@¡@Öv¡@¥z¬½¡@¡@¡@¡@¡@¡@¡@Å÷¡@¡@¡@¦äÆr¶Ç£KE-Mail¡@£D¡@¬é¡@¡@¡@¡@¡@¡@¡@¡@ 8¡@,¿ØÍg¡@§÷ 7¡@ 1 2 3 4 5 6 7 8 |