// php headlines grabber by neil moomey, www.neilmoomey.com. // you are free to use this code as you wish. // make sure you get permission from any web sites you grab headlines from. // you may want to write the headlines to a file on your server to speed things up. // grab source code from a file or web site if(!($myfile=fopen(“http://www.lndaily.com.cn/web/yw3.htm”,”r”))) { echo “the news interface is down for maintenance.”; exit; } while(!feof($myfile)) { // read each line and add to $myline $myline.=fgets($myfile,255); } fclose($myfile); // extract everything between start and end. you need to include these lines //in the headlines or pick some unique substring in the html to mark the start //and end of the news. $start=”