Welcome, Guest. Please login or register.

Author Topic: Accessing to weather information behind a proxy  (Read 1534 times)


  • Newbie
  • *
  • Posts: 26
    • View Profile
Accessing to weather information behind a proxy
« on: February 05, 2014, 01:04:10 PM »
When nedi is behind a proxy, In the topology-table page when you click on the icon Weather nothing appen.
After some research, i've found that the function file_get_content try to access directly to weather server.
to correct this problem, i've made some change in the libmon.php file.

I changed all «file_get_contents» to «file_get_Content» with the command «sed -i s/file_get_contents/file_get_Content/ libmon.php»
and i add the following function:
Code: [Select]
function file_get_Content($url){
        $aContext = array(
            'http' => array(
                'proxy' => 'tcp://',
                'request_fulluri' => true,
        $cxContext = stream_context_create($aContext);

        $sFile = file_get_contents($url, False, $cxContext);

        return $sFile;

Of course this just a workarround and this must correctly integrate with nedi.conf



  • Administrator
  • Hero Member
  • *****
  • Posts: 2749
    • View Profile
    • NeDi
Re: Accessing to weather information behind a proxy
« Reply #1 on: February 06, 2014, 07:05:54 PM »
Good one, tx!
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!