#!/usr/pkg/bin/php
<?php
$context = stream_context_create( 
	array(
		"ssl" => array(
			"verify_peer"		=> false,
			"verify_peer_name"	=> false
		)
	)
);

$uri = "http://roven/weather.php";
$url = "";
if ( count( $argv ) > 1 ) $url = urlencode( $argv[1] );
$json = file_get_contents( "{$uri}?url={$url}", false, $context );
print $json;
//if ( !empty( $argv[2] ) ) {
    $array = json_decode( $json, true );
    print_r( $array );
//}

