Forums: Open Discussion (Thread #18654)

HTTP_USER_AGENTの扱いについて (2008-05-10 18:35 by Anonymous #36572)

すみません、教えて下さい。
携帯のHTTP_USER_AGENTの情報を内部で変えずに
出力(表示)できる方法はないでしょうか?
(今は >> Mozilla/5.0 (compatible; PEAR ~な感じに変更して出力されている))

Reply to #36572×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: HTTP_USER_AGENTの扱いについて (2008-05-12 12:18 by ucb #36598)

設定ファイル(Config.inc.php)のUser-Agentの設定のところを

define('PEAR_USER_AGENT', $_SERVER['HTTP_USER_AGENT']);

のように変更していただければ、オリジナルのクライアントのUser-Agentでアクセスするようになります。
Reply to #36572

Reply to #36598×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: HTTP_USER_AGENTの扱いについて (2008-05-12 16:38 by Anonymous #36609)

ucb様

ありがとうございます。
早速やって見ましたらOKでした。
(もう少し面倒かなと思いましたが、意外と簡単にいけるのですね。)

これに関連するのですが、user-agentを変えないので
出来ましたら、ホスト情報も変えたくないのですが
(現状、la1006.6821.comになっています)
この場合、簡単にいけるのでしょうか?

すみません何回も申し訳ありませんが、よろしくお願いします。
Reply to #36572

Reply to #36609×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: HTTP_USER_AGENTの扱いについて (2008-05-12 18:42 by ucb #36615)

それは無理です。ホスト名やIPアドレスは偽装できません(できると大変なことになっちゃいます)。

ViaやX-Forwarded-Forなど、「プロキシ」として元々のホスト名などをアクセス先に伝達するためのHTTPヘッダを付与することはできますが、たぶんそういうニーズじゃあないですよね。
Reply to #36609

Reply to #36615×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: HTTP_USER_AGENTの扱いについて (2008-05-12 19:33 by Anonymous #36617)

何回もすみません。

少し勘違いと言うか、PCと携帯の「ホスト」と「user-agent」の
情報がごちゃまぜになっていたようです。

良く見たら、「la1006.6821.com」はレンタルサーバーのホスト情報と言う事が分かりました。

携帯でサイトにアクセスした時点でレンタルサーバーのホスト情報に
なってしまうようですね(何故かわかりませんが?)、失礼しました。

ありがとうございました、これで何とかまとまりがつきそうです。
(このPCサイト->携帯変換のソフトは、使い勝手も良く満足しています。)
Reply to #36615

Reply to #36617×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login