PHP

PHP 5.3

PHP

割と適当な処理は php でゴニョゴニョしてたりする当方なんですが、遅ればせながら PHP 5.3 (win32) を入れてみました。 php.ini を使い回そうとしたら互換性なくてエラーの嵐に遭ったりもしましたが、新機能の名前空間とクロージャあたりは素直に便利そうだ…

PHP でのスクレイピング メモ

手っ取り早くやる方法(要 Tidy) parseString($src, array('output-xhtml' => true), 'UTF8'); $tidy->cleanRepair(); $declarations = ''; $declarations .= '

simplexml と namespace

php

たまーに使うとよく忘れるのでメモ代わりに。 children('http://prl.org/dc/elements/1.1/'); //もしくは XPath でゴッソリ $xml->registerXPathNamespace('dc', 'http://prl.org/dc/elements/1.1/'); $dc = $xml->xpath('//dc:*')); ?>