грабер информации
Код:
<?php ############################################################### # Script Title: 4CM_Grabber # File: 4CM_Grabber.php # Description: This script will Grab information from a given web site # Author: John B. Abela # Email: support@4cm.com # Web: http://www.4cm.com/ # Version: 2.0.5 # # Copyright © 1996-2000 www.4cm.com. All Rights Reserved. # # # www.4cm.com (4CM) offers no warranties on this script. # The downloader of the script is solely responsible for any # problems caused by the installation of the script or use # of the script, including possible legal action for the grabbing # of the data, as a result of this script! # # ALL COPYRIGHT NOTICES REGARDING: www.4cm.com # MUST REMAIN INTACT IN THE SCRIPT AND IN THE HTML OF THE SCRIPT! # # For more info on this script, see: # http://www.4cm.com/ # # (Please be kind and sign our guestbook at: # http://www.4cm.com/guestbook/ and say your using # this script!!) ############################################################### ######################## ## Mandatory Setting ## ######################## $GrabURL = "http://www.defenselink.mil/index.html"; //- Complete URL of the page your grabbing from! $GrabStart = '<!-- DDI_NEWS -->'; //- HTML Code To Start Grab. Must Be A Unique Bit Of Code! $GrabEnd = '<!-- /DDI_NEWS -->'; //- HTML Code To End Grab. Must Be A Unique Bit Of Code! ############################# ## Do Not Edit Below Here ## ## Do Not Edit Below Here ## ############################# echo "<font face=Verdana size=1><B>DefenseLINK News</B><BR>"; $OpenFile = fopen("$GrabURL", "r"); //- DO NOT CHANGE $RetrieveFile = fread($OpenFile, 200000); //- Reduce This To Save Memory $GrabData = eregi("$GrabStart(.*)$GrabEnd", $RetrieveFile, $DataPrint); $DataPrint[1] = str_replace('<A HREF="/', '<A HREF="http://www.defenselink.mil/', $DataPrint[1]); $DataPrint[1] = str_replace("<li>", "", $DataPrint[1]); $DataPrint[1] = str_replace("</LI>", "<BR>", $DataPrint[1]); fclose($OpenFile); //- DO NOT CHANGE echo $DataPrint[1]; //- DO NOT CHANGE echo " <font face=Verdana size=1>Script Provided By: <a href=\"http://www.4cm.com/\" target=\"_blank\">www.4cm.com</a></font>"; //- DO NOT REMOVE #################### ## End of Script ## #################### ?>