*English subtitles are available.* Web アプリ界隈、特に日本ではまだあまり知られていないと思われる XXE や XML Bomb (XML Entity Expansion) というセキュリティ脆弱性の概要、 PHP の機能と組み合わせた攻撃手法、主に PHP 周りでの発覚事例や、対策方法について説明しますRead less
で。 第34回PHP勉強会資料 - 肉とご飯と甘いもの @ sotarok をUPしてこれでいいや、と満足していたら、即座にid:maru_ccさんからツッコミが入ってしまったので、 仕方ないので(ぉ、コードもUPします。 チューニング、というか、大規模なXMLファイルを扱うところ、もうちょっと色々検証してデータ出したいのですが、なんていうか気力がないので(ぉ、とりあえず先日はなした内容だけでも、と思ってUP。 SimpleXMLのインスタンス生成 SimpleXMLのインスタンスの生成方法は2種類×2種類あります。 文字列から、インスタンスを生成 文字列から生成する場合、一番楽なのは、以下のように、simplexml_load_string関数を使います。例えば、以下のようにします。 <?php // $xml_string に、XML文字列が入っているものとする $xml_string
Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su
一手間必要なPHPでのSimpleXML関数のパース処理 今回はPHPによるXMLデータのパース処理で気になったので、 それについての小ネタです。 まずは基本 PHP5でXMLデータを簡単にオブジェクト化してくれる 「SimpleXML」関数を利用します。 例えば simplexml_load_file() simplexml_load_string() 関数自体の細かい説明は省きますが、「simplexml_load_file()」は XMLファイルからXMLデータを読みだしてオブジェクト化し、 「simplexml_load_string()」は形成されたXML文字列をオブジェクト化する なんとも便利な関数です。 こんな感じに $xml = simplexml_load_file('xml.xml'); print($xml); 結果 SimpleXMLElement Object (
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く