Lightweight LanguageのIPv6対応PHP5編

Size: px
Start display at page:

Download "Lightweight LanguageのIPv6対応PHP5編"

Transcription

1 Lightweight Language IPv6 PHP

2 1. PHP

3 1.1. PHP

4 1.2. OS PHP OS PHP IPv6 PHP Linux CentOS 5.10 distribution, updates distribution, updates Fedora 18 distribution, updates distribution, updates Debian squeeze(6.x) wheezy (7.x) Ubuntu LTS distribution, updates FreeBSD (ports) Mac OS X * EoL(End of Life) PHP

5 2. PHP IPv6

6 2.1. PHP IPv6 dns_get_record() gethostbyaddr() PEAR (Net_DNS2) inet_pton(), inet_ptop() PHP5.1.0 L7 HTTP curl SMTP PEAR (Net_SMTP) (mail(), PEAR Mail) IPv6 PEAR (Net_IPv6 )

7 2.2. (1. ) // internetweek.jp IPv6 (AAAA ) $result = dns_get_record('internetweek.jp', DNS_AAAA); foreach ( $result as $key_top => $array ) { echo "$key_top: "; foreach ( $array as $key => ${value} ) { echo " / $key: $value"; } echo "<br>"; } // $result // array( // array( // "host" => "internetweek.jp", // "type" => "AAAA", // "ipv6" => "2001:dc2:1000:2006::c0:ffee", // "class" => "IN", // "ttl" => 300 // ) // ) DNS_ALL A AAAA host / type / ip(ipv6) / class / ttl ( ) arpa. gethostbyaddr()

8 2.2. (2. ) $result4 = gethostbyaddr(' '); $result6 = gethostbyaddr('2001:dc2:1000:2006::c0:ffee'); echo $result4; // internetweek.jp echo $result6; // internetweek.jp

9 2.3.

10 2.4. (HTTP 1. -1) HTML $fh = fopen(' r'); if ($fh === FALSE) { die("cannot open URL\n"); } while (($line = fgets($fh)) == FALSE) { echo $line; } fclose($fh);

11 2.4. (HTTP 1. -2) HTML 1 HR $contents = file(' if ($contents === FALSE) { die("cannot open URL\n"); } foreach ($contents as $line) { echo $line. <hr>; } HTML $contents = file_get_contents( [2001:dc2:1000:2006::c0:ffee]'); if ($contents === FALSE) { die("cannot open URL\n"); } echo $contents;

12 2.4. (HTTP 2. HTTP) URL $ch = curl_init(" $fp = fopen("/tmp/internetweek.txt", "w"); curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); fclose($fp);

13 2.4. (SMTP 1. ) mail() mail($to, $subject, $message);

14 2.4. (SMTP 2. PEAR-1) SMTP require 'Mail.php'; $params = array('host' => $host); $m = Mail::factory('smtp', $params); $m->send($to, $header, $body);

15 2.4. (SMTP 2. PEAR-2) SMTP $host require 'Net/SMTP.php'; $smtp = new Net_SMTP($host); $smtp->connect(); $smtp->mailfrom($from); $smtp->rcptto($to); $smtp->data($body); $smtp->disconnect(); IPv4 IPv6 [ ]

16 2.5. (1. PEAR)

17 2.5. (2. ) Net_IPv6::checkIPv6() (:: 2 ) require 'Net/IPv6.php'; $result = Net_IPv6::checkIPv6('2001:db8:1::1'); if ($result) { echo "TRUE"; } $result = Net_IPv6::checkIPv6('2001:db8::1::1'); if ( $result) { echo "FALSE"; } Net_IPv6::compress() require 'Net/IPv6.php'; echo Net_IPv6::compress('2001:db8:0:0:0:0:0:1'); echo Net_IPv6::compress('2001:db8:0:0:0123:0045:0006:07'); 2001:db8::1 2001:db8::123:45:6:7 Net_IPv6::uncompress() require 'Net/IPv6.php'; echo Net_IPv6::uncompress('2001:dc2:1000:2006::c0:ffee'); echo Net_IPv6::uncompress('2001:dc2:1000:2006::c0:ffee', TRUE); 2001:dc2:1000:2006:0:0:c0:ffee 2001:0dc2:1000:2006:0000:0000:00c0:ffee

18 3.

19 PHP

20 Internet Week 2012 IPv Internet Week 2011 Lightweight Language IPv6

Lightweight Language と IPv6

Lightweight Language と IPv6 Internet Week 2011 IPv4 アドレス枯渇時代のアプリケーション開発 Lightweight Language と IPv6 2011/12/1 社団法人日本ネットワークインフォメーションセンター 関根佳直 自己紹介 2009 年 ~ JPNIC 普段はサーバ / ネットワークの構築 運用をしています よく使う言語 C, Perl, PHP 好きな言語 Prolog, Lisp 等

More information

本セッションの概要 2012 年 11 月現在のスクリプト言語の IPv6 対応状況を, 実例を交えながら概観します ( スクリプト言語での IPv6 対応ネットワークプログラミングの解説 ではありません ) 本セッションで扱うプログラミング言語 Perl

本セッションの概要 2012 年 11 月現在のスクリプト言語の IPv6 対応状況を, 実例を交えながら概観します ( スクリプト言語での IPv6 対応ネットワークプログラミングの解説 ではありません ) 本セッションで扱うプログラミング言語 Perl Internet Week 2012 T7: IPv6 実践講座 ~ トラブルシューティング セキュリティ アプリ構築まで ~ 3. IPv6 プログラミング スクリプト言語と IPv6 2012 2012/11/20 関根佳直 rev. 20121216 本セッションの概要 2012 年 11 月現在のスクリプト言語の IPv6 対応状況を, 実例を交えながら概観します ( スクリプト言語での IPv6

More information

Webサービス, 軽量プログラミング言語のIPv6対応Perl編

Webサービス, 軽量プログラミング言語のIPv6対応Perl編 Internet Week 2013 T2 アプリケーション サービスのIPv6 対 応 軽 量 プログラミング 言 語 のIPv6 対 応 Perl 編 2013 年 11 月 26 日 技 術 本 部 技 術 開 発 部 渡 辺 露 文 1. Perlの 概 要 - 1 - 1.1. Perlの 概 要 Perl のバージョン 最 新 版 (Perl5): 5.18.1 (2013/8/12リリース)

More information

1... 5 2... 6 3... 7 4... 8 4.1... 8 4.2... 9 4.3... 9 4.4 SMTP... 10 5 2... 11 5.1 FP Mail... 11 5.2 MX... 11 6 3 /... 12 6.1... 12 6.2... 12 6.3...

1... 5 2... 6 3... 7 4... 8 4.1... 8 4.2... 9 4.3... 9 4.4 SMTP... 10 5 2... 11 5.1 FP Mail... 11 5.2 MX... 11 6 3 /... 12 6.1... 12 6.2... 12 6.3... 1... 5 2... 6 3... 7 4... 8 4.1... 8 4.2... 9 4.3... 9 4.4 SMTP... 10 5 2... 11 5.1 FP Mail... 11 5.2 MX... 11 6 3 /... 12 6.1... 12 6.2... 12 6.3... 12 6.4... 12 6.5... 12 7 4... 13 7.1 URL... 13 8 5...

More information

CodeIgniter Con 2011, Tokyo Japan, February

CodeIgniter Con 2011, Tokyo Japan, February CodeIgniter Con 2011, Tokyo Japan, February 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 http://www.iviking.org/fx.php/ 25 26 10 27 28 29 30 31

More information

P.37 P.816 P.17 P.1819 contents 1 2

P.37 P.816 P.17 P.1819 contents 1 2 201211 NEW! P.37 P.816 P.17 P.1819 contents 1 2 3 4 5 6 7 8 http://www.tokiomarine-nichido.co.jp/ 1 2 16 3 11 4 1 18 9 10 5 6 11 12 18 9 10 6 7 8 13 1411 12 5 13 14 15 1615 16 21 17 18 0120-071-281 19

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション データベースを活用した動画投稿大型キャンペーン 必要な契約エビリー様と契約 SPIRAL 基本契約 SPIRALAPI オプション ( 分間 10 件以上動画の投稿が想定される場合 ) 必要なスキル HTML Javascript PHP 作業工数 1 営業日 1 手順 1. 必要な契約の準備 2.SPIRAL の設定 (1)SPIRAL API 発行 (2) 動画管理 DB 発行 (3) 動画投稿フォーム発行

More information

_IPv6Summit金沢_IPv6アプリケーション開発.key

_IPv6Summit金沢_IPv6アプリケーション開発.key IPv6 Summit in KANAZAWA 2016 1 2 3 IPv4 API IP Networking Overview Supporting IPv6 DNS64/NAT64 Networks 4 https://developer.apple.com/news/?id=05042016a IPv6 Azure VM https://docs.microsoft.com/ja-jp/azure/load-balancer/

More information

ricoh_h1-4_d

ricoh_h1-4_d 21.3 Contents 1 3 5 9 1 11 15 17 URL 1 4 35 1.7 A+ AA- AA- 8.3 2,94 8.3 2,485 77 9.3 2,573 9.3 61 2,326 1.3 2,421 1.3 66 2,285 2 3 18 15 12 9 6 3 12. 16. 28. 14. 17. 31. 15.5 19.5 35. 17.5 18.5 36. 18.

More information

3 Ubuntu Linux Ubuntu Linux Debian Linux DistroWatch.com 1 Debian Ubuntu Linux 1 Debian CD(4.1 ) Knoppix Debian CentOS Linux CentOS 1 Ubuntu L

3 Ubuntu Linux Ubuntu Linux Debian Linux DistroWatch.com 1 Debian Ubuntu Linux 1 Debian CD(4.1 ) Knoppix Debian CentOS Linux CentOS 1 Ubuntu L Linux PC #5 29 5 12 1 #1 tdh8025 1 Kadai1 evince kghostview ls -a ( ) 5 19 ( ) 2 Linux Linux distribution CentOS Linux Ubuntu Linux PC Linux Linux (OS) OS ( OS ) Linux 1 Linux Hurd FreeBSD GNU OS OS Linux

More information

PowerPoint プレゼンテーション

PowerPoint プレゼンテーション ネットワークプログラミング 演習 第 12 回 Web サーバ上で動作するプログラム 2 今日のお題 PHPのプログラム例 おみくじ アクセスカウンタ ファイルの扱い lock ファイルの所有者 許可と権限 PHP の文法 ( の一部 ) if, for, while の制御の構文は C 言語と似ている 型はあるが 明示的な宣言はしなくてよい 変数には型がない 変数の宣言はしなくてよい 変数名には

More information

Ubuntu Linux PC Ubuntu Linux (14.04 LTS, Trusty Tahr) 32bit CD 64bit CD 2. 32bit CPU 64bit 32bit PC CPU 32bit 64bit Windows 64bit 64bit. 32bit Core 64

Ubuntu Linux PC Ubuntu Linux (14.04 LTS, Trusty Tahr) 32bit CD 64bit CD 2. 32bit CPU 64bit 32bit PC CPU 32bit 64bit Windows 64bit 64bit. 32bit Core 64 Linux PC #5 26 5 16 1 Linux Linux distribution CentOS Linux Ubuntu Linux PC Linux Linux (OS) OS ( OS ) Linux 1 Linux Hurd FreeBSD GNU OS OS Linux Linux Linux Debian GNU/Linux, Ubuntu Linux, RedHat Linux,

More information

A/B WWW MTA/MSP sendmail POP/IMAP apache WWW 1 1 sendmail uw imap apache WWW host host subnet1: /24 IF1: router & server mail and

A/B WWW MTA/MSP sendmail POP/IMAP apache WWW 1 1 sendmail uw imap apache WWW host host subnet1: /24 IF1: router & server mail and A/B WWW MTA/MSP sendmail POP/IMAP apache WWW 1 1 sendmail uw imap apache WWW host host subnet1: 192.168.1/24 IF1:192.168.1.1 router & server mail and WWW IF2:192.168.0.32 subnet2: 192.168.0/24 1: 1 2 iep.sie.dendai.ac.jp

More information

オンラインテスト

オンラインテスト 1. 2. JavaScript 3. Perl 4. CGI 1. WWW HTML WWW World Wide Web HTML Hyper Text Markup Language XML, XHTML Java (.java) JavaApplet (.class,.jar) JavaServlet (.jsp) JavaScript (.html) CGI (.cgi) SSI (.shtml)

More information

IP Windows Word Excel Web Web Word Excel XHTML CSS Web Windows Word Excel Web XHTML CSS

IP Windows Word Excel Web Web Word Excel XHTML CSS Web Windows Word Excel Web XHTML CSS IP IT CG CG IP Windows Word Excel Web Web Word Excel XHTML CSS Web Windows Word Excel Web XHTML CSS SCC SCC Word Excel etc OS OS SCC IP SCC VLSI IP URL http : //csw.ist.hokudai.ac.jp/hiu> hiu CASLII

More information

凸 凸 デコメールとは 簡易な HTML メール 普通のメール デコメールだと 各キャリアの凸 DoCoMo (i-mode) デコメール au (EZweb) デコレーションメール SoftBank (S! メール ) アレンジメール DoCoMo / デコメール Version 対応機種テンプレート 1.0 900iシリーズ 901iシリーズ らくらくホンIII 2.0 D800iDS 902iシリーズ

More information

エラー処理・分割コンパイル・コマンドライン引数

エラー処理・分割コンパイル・コマンドライン引数 L10(2017-12-05 Tue) : Time-stamp: 2017-12-17 Sun 11:59 JST hig. recv/send http://hig3.net ( ) L10 (2017) 1 / 21 IP I swallow.math.ryukoku.ac.jp:13 = 133.83.83.6:13 = : IP ( = ) (well-known ports), :. :,.

More information

名称未設定

名称未設定 Parallels Desktop 6 for Mac Read Me Parallels Desktop for Mac build 6.0.11822 Parallels Desktop for Mac 1.Parallels Desktop for Mac 2. 3. 4. 5. Parallels Desktop 6. Parallels Desktop 6 for Mac 7. Parallels

More information

17 1721 42 47 63 1214 15 16 1718 47 6010 10 1316 1719 52 1417 1718 49 53 1315 1617 1719 47 49 11 1214 1718 52 54 11 13 2 No.1311 2005. 4. 13

17 1721 42 47 63 1214 15 16 1718 47 6010 10 1316 1719 52 1417 1718 49 53 1315 1617 1719 47 49 11 1214 1718 52 54 11 13 2 No.1311 2005. 4. 13 No.1311 2005.4.13 CONTENTS 17 1721 42 47 63 1214 15 16 1718 47 6010 10 1316 1719 52 1417 1718 49 53 1315 1617 1719 47 49 11 1214 1718 52 54 11 13 2 No.1311 2005. 4. 13 1617 1718 16 1718 10 12 16 13 1512

More information

関西テレビ放送番組制作ガイドライン

関西テレビ放送番組制作ガイドライン Contents Contents Contents Contents 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

More information

newmodelinformation_book_sample.pdf

newmodelinformation_book_sample.pdf 05 29 http://www.yano-pbi.com/ 03-5371-6923 FAX:03-5352-1088 CONTENTS 1 2 3 4 5 6 7 8 9 10 10 11 11 12 12 13 14 14 15 15 16 17 17 18 18 19 20 20 21 22 23 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

More information

2 No

2 No No.1297 2004.9.22 CONTENTS 2 No.1297 2004. 9. 22 9 11 15 15 28 16 25 1210 17 26 3 No.1297 2004. 9. 22 11 14 11 10 40 13 00 2 1 12 15 4 000 35 141 100 4 No.1297 2004. 9. 22 4 000 14 15 29 16 27 5 No.1297

More information

2 No

2 No No.1322 2005.10.26 CONTENTS 2 No.1322 2005. 10. 26 No.1322 2005. 10. 26 3 4 No.1322 2005. 10. 26 No.1322 2005. 10. 26 5 21 21 29 18 2913 00 19 00 200 18 19 6 No.1322 2005. 10. 26 7 No.1322 2005. 10. 26

More information

1 CONTENTS P.6 P.13 P.15 P.16 P.22 P.30 P.37 P.41 P.42 P.43 P.44 P.45 P.46 P.2 P.2 P.3 P.2 P.3 P.2 P.6 P.5 P.4 P.3 P.3 P.3 P.3

1 CONTENTS P.6 P.13 P.15 P.16 P.22 P.30 P.37 P.41 P.42 P.43 P.44 P.45 P.46 P.2 P.2 P.3 P.2 P.3 P.2 P.6 P.5 P.4 P.3 P.3 P.3 P.3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1FAX 2009 4 1 CONTENTS P.6 P.13 P.15 P.16 P.22 P.30 P.37 P.41 P.42 P.43 P.44 P.45 P.46 P.2 P.2 P.3 P.2 P.3 P.2 P.6 P.5 P.4 P.3 P.3 P.3 P.3 3 2 1 1 1 1 1 1 1 1 1 1

More information

PJta_h1h4_0329.ai

PJta_h1h4_0329.ai 0120-119-110 1-2-1 100-8050 http://www.tokiomarine-nichido.co.jp/ 24365 0120-691-300 98 http://www.tokiomarine-nichido.co.jp/ 201071 19 P.37 P.816 P.17 P.1819 contents 1 2 3 4 5 6 1 2 3 4 http://www.tokiomarine-nichido.co.jp/

More information

−ÈŁÛ05/‚æ4‘Í

−ÈŁÛ05/‚æ4‘Í CONTENTS 1. 50 2. 51 3. 52 52. 6 1 6 2 6 3 65 65 5. 66 6. 67 1 67 2 67 3 68 7. 69 8. 69 1 69 2 69 3 70 70 9. 71 9 1 50 2 51 52 3 53 5 55 56 57 58 59 60 61 62 63 1 2 6 3 65 5 66 6 1 2 67 3 68 7 8 1 2 69

More information

24_5章_01f

24_5章_01f CONTENTS p08 1 2 3 4 p14 p20 p24 p28 p40 03 04 05 4527,575 9 405,849 0.1 4,908 9405,849 17 790,361 74 3,331,365 6 243,400 34 1,554,738 51 2,318,680 161,853 122,460 9 410,863 163,253 3121,444 0.15,830 24

More information

untitled

untitled T O N E G U N 2012 S H I N K I N E R S U L O C S I D B A N K 1. 2. 3. CONTENTS 1. 2. 1. 2. 3. 4. 5. 02 03 04 05 17, 216 84362 1,63323 516 225 17 06 07 1,385 46 1 42 31 3.3% 2.2% 67.4% 08 09 10 1 3 2 1

More information

.\..

.\.. CONTENTS 2 4 7 8 10 12 14 19 22 28 31 35 39 40 41 47 54 59 68 71 79 83 90 1 CONTENTS 2 4 7 8 10 12 14 19 22 28 31 35 39 40 41 47 54 59 68 71 79 83 90 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

More information

名称未設定-1

名称未設定-1 Contents http://www.saitama-ctv-kyosai.net 2 250 554 810 13462 250 6318 7144 250 5710 7752 250 5078 8384 2 3201 32 3073 2 1478 1595 2 1382 1691 2 1382 1691 16535 8739 1 2 3 1 2 3 http://www.saitama-ctv-kyosai.net/

More information

<93FA967B8CEA2E706466>

<93FA967B8CEA2E706466> CONTENTS CONTENTS CONTENTS 1 2 1 1 2 2 22 2 2 2 2 28 2 2 1 2 6 2 7 2 2 1 2 1 2 11 1 2 22 2 2 2 2 1 2 2 2

More information

海外旅行_2007pdf版

海外旅行_2007pdf版 CONTENTS 03 10 14 19 21 25 29 35 39 A. 3 4 1 2 3 4 5 6 7 8 9 10 5 6 8 7 A. 9 10 12 11 l 13 14 15 16 17 18 A. 19 20 A. 21 22 23 24 A. 25 26 27 28 29 30 31 32 33 34 A. 35 36 37 38 http://www.forth.go.jp/

More information

オートバイの保険.indd

オートバイの保険.indd 201211 P.37 P.816 P.17 P.1819 contents 1 2 3 4 5 6 1 18 1 2 16 3 11 4 5 7 8 6 18 9 10 6 7 8 9 10 11 12 11 13 12 5 13 14 14 15 18 16 19 17 20 21 0120-071-281 0570-022808 15 16 3 4 1 0 0 0 0 0 4 1 2 17 18

More information

untitled

untitled Contents 01 02 03 1 05 07 09 11 13 15 2 17 19 21 23 3 25 27 29 31 4 33 35 39 41 43 43 43 01 02 03 1 1 A A D C B A C D E D 2 3 4 5 05 1 A B C D E 2 3 4 5 06 1 A B C D 2 A B B C C E D A D E 3 A B C D E 4

More information

n_bead 4_14_NotOut

n_bead 4_14_NotOut http://www.nsswelding.co.jp CONTENTS 1 5 6 7 10 11 12 13 14 4 * * * * * 5 + + + + 6 * ** * 7 * * * * * * * 1 * * * * * * * 2 * * * * 9 * * * * * * 10 * * * * * 11 + + + + + + + + + + + 1 2 3 + + + +

More information