From:             webmaster at msc-solutions dot de
Operating system: Suse Linux
PHP version:      4.3.4
PHP Bug Type:     Output Control
Bug description:  ereg(i) (not really a bug)

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

-- 
Edit bug report at http://bugs.php.net/?id=28592&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28592&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28592&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28592&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28592&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28592&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28592&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28592&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28592&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28592&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28592&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28592&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28592&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28592&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28592&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28592&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28592&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28592&r=float

Reply via email to