[aprssig] The PHP file_get_contents function not working

Steve Dimse steve at dimse.com
Wed Apr 11 11:42:49 EDT 2012


The system may be detecting it is being accessed by machine. The system has some code to recognize non-permitted use and block it. Even if that is not the problem and it is simply a syntax error, this sort of use of findU is not allowed because of past abuse and limited resources.

From the FAQ on the front page of findU:

Dynamic findU HTML pages must not be used to extract data which goes into a database...in other words, no screen scrapers. If you have a project that needs to do this, you should either use the APRSworld database as a backend or create your own database by parsing the APRS data stream. Lately there has been a great increase in the number of people attempting screen-scraping, so I must clarify my position. A single access generated from a user action (starting a program, pushing a button, etc.) is allowed, while any repetative access by a program is NOT ALLOWED. This is necessary because a single program can use as much resource as dozens of human users, and I do not have the capacity to support this sort of use. I will be monitoring for inappropriate access and blocking IPs where I find a problem.

On Apr 11, 2012, at 11:03 AM, Keith Kaiser wrote:

> Below is the code I'm using in an attempt to extract posit data from FindU. But it doesn't work. I'm hoping someone will take a quick look and see immediately what I'm doing wrong. Any help you can provide will be greatly appreciated.
> 
> Thanks in advance.
> 
> <?php
> ini_set('display_errors', 1);
> error_reporting(E_ALL);
> 
> function posit($call){
> 
> 	$url = 'http://www.findu.com/cgi-bin/posit.cgi?';
> 	
> 	$params = array( 'call' => $call, 'start' => 36, 'time' => 1, 'comma' => 1 );
> 	
> 	$opts   = array('http' => array(
> 				    'method'  => "POST",
> 				    'content' => http_build_query($params)));
> 	
> 	$context = stream_context_create($opts);
> 	
> 	$finduCall = file_get_contents("$url", FALSE, $context);
> 	
> 	echo $finduCall;
> }
> 
> echo posit("wa0tjt-1");
> 
> ?>
> _______________________________________________
> aprssig mailing list
> aprssig at tapr.org
> https://www.tapr.org/cgi-bin/mailman/listinfo/aprssig
> 





More information about the aprssig mailing list