Order Tray | Contact Us | Home | SIG Lists

[aprssig] The PHP file_get_contents function not working

Keith Kaiser wa0tjt at gmail.com
Wed Apr 11 15:03:26 UTC 2012


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");

?>


More information about the aprssig mailing list