Christian271
08-14-2008, 09:17 PM
I use this code to get the source of line 25 of dragcave.net.
$lines = file('http://dragcave.net/user/Christian271');
$line = $lines[25];
I need to delete all <td><a href="/viewdragon/HkLG">View</a></td>
from it but the HkLG is going to be different every time.
I tried this
$re = '';
$pattern = '/(<td><a href="/viewdragon/)....(">View</a></td>)/';
$line2 = preg_replace($pattern, $re, $line);
echo($line2); but I get the error 'Warning: preg_replace() [function.preg-replace (http://mytoolbaraccess.net84.net/function.preg-replace)]: Unknown modifier 'v' in /home/a9196005/public_html/test.php on line 16' line 16 is $line2 = preg_replace($pattern, $re, $line); Any ideas?
$lines = file('http://dragcave.net/user/Christian271');
$line = $lines[25];
I need to delete all <td><a href="/viewdragon/HkLG">View</a></td>
from it but the HkLG is going to be different every time.
I tried this
$re = '';
$pattern = '/(<td><a href="/viewdragon/)....(">View</a></td>)/';
$line2 = preg_replace($pattern, $re, $line);
echo($line2); but I get the error 'Warning: preg_replace() [function.preg-replace (http://mytoolbaraccess.net84.net/function.preg-replace)]: Unknown modifier 'v' in /home/a9196005/public_html/test.php on line 16' line 16 is $line2 = preg_replace($pattern, $re, $line); Any ideas?