i am having the code

          if (eregi($file,$_SERVER["HTTP_ACCEPT_LANGUAGE"]) && !$use_lang) $use_lang = $file;

   This line of code is giving error:-Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\spm\includes\header.php on line 15

Correct. It is deprecated as of PHP5. Move to the preg_xxx functions, in your case preg_match.

after changing with preg_match it is giving another error- preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in C:\xampp\htdocs\spm\includes\header.php on line 15

Show your code, you must've forgot to add delimiters to the pattern.

  //to know, where I am (just for display this in the menuebar) - easy replacement of the extension
  $show = str_replace(".php","",basename($_SERVER["SCRIPT_NAME"]));

  include_once ("conf.php");
  include ("functions.php");

  if ($_REQUEST["use_lang"]) $use_lang = $_REQUEST["use_lang"];
  if (!$pm_auth) {
    //all languages
    if ($handle = opendir('lang/')) {
      while (false !== ($file = readdir($handle))) {
        if ($file != "." && $file != ".." && is_dir("lang/$file")) {
          $languages[] = $file;
          if (eregi($file,$_SERVER["HTTP_ACCEPT_LANGUAGE"]) && !$use_lang) $use_lang = $file;
    if (!$use_lang) $use_lang = "en";
  /*** Language File ***/
  $lang_file = "lang/$use_lang/common.lang.php";
  if (file_exists($lang_file)) {
  } else {
    $output = error(array("Language file $lang_file not found")) . "</div></body></html>";

this is the top lines of my code.

line 15 is the line which is giving error.

Doesn’t line 15 have eregi ? That wasn’t the topic ? Is that the old code ?

if (preg_match("~$file~i", $_SERVER["HTTP_ACCEPT_LANGUAGE"]) && !$use_lang) 
    $use_lang = $file;