- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$string = '<img src="/index.php/tools/packages/bullseye/file_display.php?htmlpage=&fID=300" />';
$file_ids = array();
$html = preg_match_all('~src="/index\.php/tools/packages/bullseye/file_display\.php\?htmlpage=&fID=(\d+)"~', $string, $file_ids);
var_dump($file_ids);