próbuje na swojej stronie wyciągnąć dane z WOŚPowych aukcji allegro. Niestety wszystko jest okej do momentu, w którym kod przechodzi do nowej linii. Próbowałem użyć str_replace i nic nie pomaga.
Czy mógłby ktoś pomóc rozwiązać problem?
preg_match_all('[<td class="col1"><a href="/(.*)" class="iImg" data-img="(.*)"></a></td>]', $usun, $wynik);
//$content = file_get_contents('http://aukcje.wosp.org.pl/listing?sellerId=672050&order=pd'); //$usun = str_replace(array("\n", "\n\r", "\r\n", "\r"), " ", $content); //preg_match_all('[<td class="col1"><a href="/(.*)" class="iImg" data-img="(.*)"></a></td>]', $usun, $wynik); //echo print_r($wynik);
//$content = file_get_contents('http://aukcje.wosp.org.pl/listing?sellerId=672050&order=pd'); //$usun = str_replace(array("\n", "\n\r", "\r\n", "\r"), " ", $content); preg_match_all('[<td +class="col1" *><a +href="/(.*)" +class="iImg" +data-img="(.*)" *></a></td>]', $usun, $wynik); //echo print_r($wynik);
preg_match_all('#<td class="col1"><a href="(.*?)"\s*class="iImg" data-img="(.*?)">#', $content, $aukcje); $wynik=array_combine($aukcje[1], $aukcje[2]); foreach ($wynik as $url => $img) { }