This domain may be for sale!
携帯サイトを作る場合、機種判定が必要になる場合が多いと思います。 今回は、機種判定を簡単に行ってくれるライブラリ、PEAR::Net_UserAgent_Mobileをご紹介します。 まず、PEAR::Net_UserAgent_Mobileをインストールします。このライブラリはベータ版なので、pearコマンドを使って pear install Net_UserAgent_Mobile-alpha で、インストールすることが出来ます。 インストールできたら、さっそく使ってみましょう。以下は、アクセスしてきた端末のキャリアと型番を表示するサンプルプログラムになります。 <?php // ここのインクルード指定は、Net_UserAgent_Mobileの配置場所に応じて適宜変更して下さい。 include_once('Net/UserAgent/Mobile.php'); $agent =
harukiです。 携帯サイト作成の際に使えるPHPのライブラリを知っているだけ羅列してみます。 Net_UserAgent_Mobile 基本となるライブラリです。機種判定など、様々な用途に使用します。 細かい情報については、スクレイピングなどをしたりして自前で用意する必要があります。 PEAR::Mail メールの送信に使用できます。 特殊な送信の際は、Mail::factory()にsmtpで使用することになりますが、キャリアの迷惑メールの設定にも気をつける必要があります。 Mail_mime_Decomail (Y-110's Wiki) Mail_mimeと同じ使い方で、デコメール送信用にMIMEを組み立てることができるのでとても便利です。 Mail_mimeDecode 空メール・エラーメールなどを受け取って解析する際に使用します。 解析の際には、Mail_RFC822:
QuickFormのdisplay関数で出力したフォームはお世辞にもデザイン的に優れているとはいえません。 そこで、デザイン部分をSmartyに担当させQuickFormとSmartyを連携させたいと思います。 <html> <head> <title>QuickForm サンプル</title> </head> <body> <?php require_once 'HTML/QuickForm.php'; require_once 'HTML/QuickForm/Renderer/ArraySmarty.php'; require_once 'Smarty.class.php'; $objQF = new HTML_QuickForm('frmQF', 'get'); $defaultValue = array('txtNAME'=>'bnote','rdoSEX'=>'男'); $ob
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く