try changing this:
Code:
  $status = file_get_contents($filename);
//  $result = include($filename);
    if ($result=='2')
to this:
Code:
  $status = file_get_contents($filename);
  $result = substr($status, 1, 1); // to read 1 character starting at the 2nd position (0 = first position)
    if ($result=='2')