brabbelj
Doppel-As
Hi,
ich habe einen Regex für rapidshare links geschrieben, allerdings gibt er nicht alle Links aus. Er gibt z.b. nur jeden 2ten aus, oder nur den ersten und letzten nicht. Ich kann keine regelmäßigkeit dadrin erkennen.
Die Links sehen so aus:
Die Ausgabe bei diesem speziellen Beispiel sieht so aus:
Kann mir jeamnd helfen?
mfg
brabbelj
PS:
print_r von $match gibt das aus:
ich habe einen Regex für rapidshare links geschrieben, allerdings gibt er nicht alle Links aus. Er gibt z.b. nur jeden 2ten aus, oder nur den ersten und letzten nicht. Ich kann keine regelmäßigkeit dadrin erkennen.
PHP:
<?php
$links = $_POST['links'];
preg_match_all("/http:\/\/rapidshare\.com\/files\/[1-9]{6,10}\/(.*?)\.rar/", $links, $match);
foreach($match as $v1){
foreach($v1 as $v2){
if(strstr($v2, "rapidshare.com")){
echo $v2 . "<br>";
}
}
}
?>
Die Links sehen so aus:
Code:
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633023/Datei-xbb.part01.rar" target="_blank">Part 1</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633099/Datei-xbb.part02.rar" target="_blank">Part 2</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633146/Datei-xbb.part03.rar" target="_blank">Part 3</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633224/Datei-xbb.part04.rar" target="_blank">Part 4</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633266/Datei-xbb.part05.rar" target="_blank">Part 5</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633335/Datei-xbb.part06.rar" target="_blank">Part 6</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633379/Datei-xbb.part07.rar" target="_blank">Part 7</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633428/Datei-xbb.part08.rar" target="_blank">Part 8</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633498/Datei-xbb.part09.rar" target="_blank">Part 9</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633543/Datei-xbb.part10.rar" target="_blank">Part 10</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633571/Datei-xbb.part11.rar" target="_blank">Part 11</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633627/Datei-xbb.part12.rar" target="_blank">Part 12</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633686/Datei-xbb.part13.rar" target="_blank">Part 13</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633748/Datei-xbb.part14.rar" target="_blank">Part 14</a> |
<a href="http://example.com/out.php?link=extern;url=http://rapidshare.com/files/96633760/Datei-xbb.part15.rar" target="_blank">Part 15</a>
Die Ausgabe bei diesem speziellen Beispiel sieht so aus:
Code:
http://rapidshare.com/files/96633146/Datei-xbb.part03.rar
http://rapidshare.com/files/96633224/Datei-xbb.part04.rar
http://rapidshare.com/files/96633266/Datei-xbb.part05.rar
http://rapidshare.com/files/96633335/Datei-xbb.part06.rar
http://rapidshare.com/files/96633379/Datei-xbb.part07.rar
http://rapidshare.com/files/96633428/Datei-xbb.part08.rar
http://rapidshare.com/files/96633498/Datei-xbb.part09.rar
http://rapidshare.com/files/96633543/Datei-xbb.part10.rar
http://rapidshare.com/files/96633571/Datei-xbb.part11.rar
http://rapidshare.com/files/96633627/Datei-xbb.part12.rar
http://rapidshare.com/files/96633686/Datei-xbb.part13.rar
http://rapidshare.com/files/96633748/Datei-xbb.part14.rar
Kann mir jeamnd helfen?
mfg
brabbelj
PS:
print_r von $match gibt das aus:
Code:
Array ( [0] => Array ( [0] => http://rapidshare.com/files/96633146/Datei-xbb.part03.rar [1] => http://rapidshare.com/files/96633224/Datei-xbb.part04.rar [2] => http://rapidshare.com/files/96633266/Datei-xbb.part05.rar [3] => http://rapidshare.com/files/96633335/Datei-xbb.part06.rar [4] => http://rapidshare.com/files/96633379/Datei-xbb.part07.rar [5] => http://rapidshare.com/files/96633428/Datei-xbb.part08.rar [6] => http://rapidshare.com/files/96633498/Datei-xbb.part09.rar [7] => http://rapidshare.com/files/96633543/Datei-xbb.part10.rar [8] => http://rapidshare.com/files/96633571/Datei-xbb.part11.rar [9] => http://rapidshare.com/files/96633627/Datei-xbb.part12.rar [10] => http://rapidshare.com/files/96633686/Datei-xbb.part13.rar [11] => http://rapidshare.com/files/96633748/Datei-xbb.part14.rar ) [1] => Array ( [0] => Datei-xbb.part03 [1] => Datei-xbb.part04 [2] => Datei-xbb.part05 [3] => Datei-xbb.part06 [4] => Datei-xbb.part07 [5] => Datei-xbb.part08 [6] => Datei-xbb.part09 [7] => Datei-xbb.part10 [8] => Datei-xbb.part11 [9] => Datei-xbb.part12 [10] => Datei-xbb.part13 [11] => Datei-xbb.part14 ) )