3
1
Back

Oatmeal $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } if (ADD_IDS) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ foreach ($imgs as $img) { if ($rel[0] == '/') { $path = preg_replace('#/[^/]*$#', '', $path); /* replace '//' or '/./' or '/foo/../' with '/' */ for($n=1; $n>0; $abs=preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL */ $abs = "$host$path/$rel"; /* replace.

New Pull Request