<?php
$a = '<div class="textrcolumn"> <i><a rel="nofollow" style="color:#7ACD1B" href="http://www.szukammp3.pl" target="new">www.szukammp3.pl</a></i> -
2.95 MB -
<a title = "Download : deep purple - soldier of fortune Mp3" href="url?id=MTU2MjUyMTV8ODMxMDQ0"><u>Download</u></a> -
<a title= "Listen to : deep purple - soldier of fortune without having to download the song!" HREF="javascript:;" onClick="niftyplayer("niftyPlayer1").loadAndPlay("http://www.szukammp3.pl/mp3/download/j8zIONFfEl/deep_purple_-_soldier_of_fortune.mp3")"><u>Listen</u></a> -
<a title = "Find lyrics for deep purple - soldier of fortune" href="search?q=lyrics:deep purple - soldier of fortune"><u>Lyrics</u></a>
</div><br>';
$dom=new DOMDocument();
@$dom->loadHTML($a);
$divtag = $dom->getElementsByTagName('div');
foreach ($divtag as $div) {
preg_match("/download(.*)/",$dom->saveHTML($div),$matches);
var_dump($matches);
//preg_match("/loadAndPlay\('(.*?)')/",$dom->saveHTML($div),$matches);
/*
$atagD7 = $dom->saveHTML($div);
$doma=new DOMDocument();
@$doma->loadHTML($atagD7);
$atagD7 = null;
$doma = null;
*/
//var_dump($div->nodeValue);
}
?>
- Output for 5.3.6 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- array(2) {
[0]=>
string(96) "download the song!" href="javascript:;" onclick="niftyplayer(" niftyplayer1><u>Listen</u></a> - "
[1]=>
string(88) " the song!" href="javascript:;" onclick="niftyplayer(" niftyplayer1><u>Listen</u></a> - "
}
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.5
- Warning: DOMDocument::saveHTML() expects exactly 0 parameters, 1 given in /in/PmS5Z on line 14
array(0) {
}
- Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
- Fatal error: Cannot instantiate non-existent class: domdocument in /in/PmS5Z on line 9
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Cannot instantiate non-existent class: domdocument in /in/PmS5Z on line 9
preferences:
236.92 ms | 401 KiB | 387 Q