PHP notice

Undefined variable: file

/var/www/sites571/data/www/gigafootball.net/protected/controllers/OnlineController.php(66)

54            if(!$fp) echo"$errstr ($errno)<br />\n";
55            else{
56            $headers = "GET $path HTTP/1.0\r\n";
57            $headers .= "Host: $host\r\n";
58            $headers .= "Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\n";
59            $headers .= "Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r\n";
60            $headers .= "Accept-Language: ru-RU,ru;q=0.9,en;q=0.8\r\n";
61            $headers .= "User-Agent: Opera/9.22 (Windows NT 5.1; U; ru)\r\n";
62            $headers .= "Cache-Control: no-cache\r\n";
63            $headers .= "Referer: http://$host/\r\n";
64            $headers .= "Connection: Close\r\n\r\n";
65            fwrite($fp,$headers);
66            while($file != "\r\n") $file = fgets($fp,128);
67            $file = "";
68            while(!feof($fp)) $file .= fgets($fp,4096);
69            fclose($fp);
70            }
71 
72 
73 
74            $file=preg_replace('/<\!DOCTYPE html(.*?)<h1 class=\"general\">Футбол. Результаты<\/h1>/si','',$file);
75 
76 
77            $file=preg_replace('/<div class=\"clear\">(.*?)<\/html>/si','',$file);
78 

Stack Trace

#7
+
 /var/www/sites571/data/www/gigafootball.net/index.php(15): CApplication->run()
10 defined('YII_DEBUG') or define('YII_DEBUG',true);
11 // specify how many levels of call stack should be shown in each log message
12 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
13 
14 require_once($yii);
15 Yii::createWebApplication($config)->run();
2024-03-19 07:18:59 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 Yii Framework/1.1.13