Warning: fopen(./file_info/descriptions/FISTS_Scraper.txt.0) [function.fopen]: failed to open stream: Permission denied in /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php on line 261
Warning: fwrite(): supplied argument is not a valid stream resource in /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php on line 262
Warning: fclose(): supplied argument is not a valid stream resource in /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php on line 263
Warning: Cannot modify header information - headers already sent by (output started at /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php:261) in /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php on line 279
Warning: Cannot modify header information - headers already sent by (output started at /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php:261) in /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php on line 280
Warning: Cannot modify header information - headers already sent by (output started at /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php:261) in /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php on line 281
Warning: Cannot modify header information - headers already sent by (output started at /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php:261) in /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php on line 282
Warning: Cannot modify header information - headers already sent by (output started at /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php:261) in /home/uts/if/ifzb/banks/public_html/ham/downloads/index.php on line 283
#! /usr/bin/php
// Roger Banks 28 May 2007
// This script is an html screen scraper. It is designed accept a list of
// callsigns and lookup each one on the FISTS website. It determines if a
// callsign has a FISTS number and appends those that do to an output file.
$filename = "callsigns.txt";
//$regexp = "/FISTS number: (.*?)<\/h2>/s";
$regexp = "/FISTS number:<\/b> (.*?) - /s";
$handle = fopen($filename, "r");
if ($handle) {
while (!feof($handle)) {
$callsign = trim(fgets($handle, 4096));
$url = "http://www.wm7d.net/perl/fistsselect.pl?fists_number=$callsign";
$html = file_get_contents($url);
if(preg_match($regexp, $html, $hit)) {
print $callsign . " -- ". $hit[1] . "\n";
}
}
fclose($handle);
}
?