|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-05-31 13:58 UTC] webmaster at msc-solutions dot de
  [2004-05-31 14:10 UTC] derick@php.net
 | |||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 19:00:02 2025 UTC | 
Description: ------------ hi, i coded a script which catches the links from a page.But that eregi thing is very stupid. Reproduce code: --------------- <? $file = fopen ("http://www.msc-solutions.de/suche.txt", "r"); while (!feof($file)) { $line = fgets($file); if (eregi ('href="(.*)"', $line, $out)) { $nr1 = $out[1]; $nr2 = $out[2]; echo "Linknr1: $nr1"; echo "Linknr2: $nr2"; break; } } ?> Expected result: ---------------- Linknr1: www.google.de Linknr2: www.gmx.de Actual result: -------------- www.google.de">googleararga a awerg agdcgasdfgadfg garg<a href="www.gmx.de