Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 09:49 am EST

Geeklog Forums

Nettools & 1.3.12


Status: offline

scroff

Forum User
Regular Poster
Registered: 02/19/03
Posts: 111
I'm getting this error when I use the Whois Query in Nettools since updating to 1.3.12...


Warning: Invalid argument supplied for foreach() in /home/public_html/nettools/whois.php on line 97



I d/l and replaced whois.php just incase I screwed up the file, and still the same...

line 97 is pointed out (>>> ) in the code snippet below...

Text Formatted Code
if ($domain <> '') {
    $whois = new Whois($domain);
    $result = $whois->Lookup();
    $T = new Template($_CONF['path'] . 'plugins/nettools/templates');
    $T->set_file('page', 'net2.thtml');
    $T->set_block('page','Arow','ABlock');
    $T->set_var('img_src',$_CONF['site_url'] . '/nettools/net.gif');
    $T->set_var('site_url',$_CONF['site_url']);
    $T->set_var('row_name', $LANG_NT00['host']);
    $T->set_var('row_data', $result['regrinfo']['network']['host_name']);
    $T->parse('ABlock','Arow',true);
    $T->set_var('row_name', $LANG_NT00['ip']);
    $T->set_var('row_data', $result['regrinfo']['network']['host_ip']);
    $T->parse('ABlock','Arow',true);
    $T->set_var('row_name', $LANG_NT00['owner']);
    $T->set_var('row_data', $result['regrinfo']['owner']['organization']);
    $T->parse('ABlock','Arow',true);
    $T->set_var('row_name', $LANG_NT00['address']);
    $T->set_var('row_data', $result['regrinfo']['owner']['address']['street']);
    $T->parse('ABlock','Arow',true);
    $T->set_var('row_name', $LANG_NT00['city']);
    $T->set_var('row_data', $result['regrinfo']['owner']['address']['city'] . ', ' . $result['regrinfo']['owner']['address']['state'] . '  ' . $result['regrinfo']['owner']['address']['pcode']);
    $T->parse('ABlock','Arow',true);
    $T->set_var('row_name', $LANG_NT00['country']);
    $T->set_var('row_data', $result['regrinfo']['owner']['address']['country']);
    $T->parse('ABlock','Arow',true);
    $T->set_var('row_name', $LANG_NT00['net_block']);
    $T->set_var('row_data', $result['regrinfo']['network']['inetnum']);
    $T->parse('ABlock','Arow',true);
    $T->set_var('row_name', $LANG_NT00['net_name']);
    $T->set_var('row_data', $result['regrinfo']['network']['name']);
    $T->parse('ABlock','Arow',true);
    $T->set_var('row_name', $LANG_NT00['net_handle']);
    $T->set_var('row_data', $result['regrinfo']['network']['handle']);
    $T->parse('ABlock','Arow',true);
    $pre='';
>>>foreach($result['rawdata'] as $str) {
        $pre .= $str . "n";
    }
    $T->set_var('form_output',$pre);
} else {
    $T = new Template($_CONF['path'] . 'plugins/nettools/templates');
    $T->set_file('page', 'nettools.thtml');
    $T->set_block('page','frmquery','ABlock');
    $T->set_var('img_src',$_CONF['site_url'] . '/nettools/net.gif');
    $T->set_var('site_url',$_CONF['site_url']);
    $T->set_var('query_txt',$LANG_NT00['whois']);
    $T->set_var('query_page','whois.php');
    $T->set_var('input','domain');
    $T->set_var('in_type','hidden');
    $T->set_var('sub_name','submit');
    $T->set_var('sub_value',$LANG_NT00['submit']);
    $T->parse('ABlock','frmquery',true);
}


 


Any ideas what I need to do? I'm stumped... too deep for me. praying it will work Can someone help me
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
Upgrading to 1.3.12 should not cause any issues here. I suspect that the whois data has changed a little. Try a different domain.
 Quote

Status: offline

scroff

Forum User
Regular Poster
Registered: 02/19/03
Posts: 111
Ok, well, now I've gone and done it again. I didn't investigate thoroughly myself before posting.... Embarassed

Thanks for your quick reply Tom.

It seems that if there's white space after a url, it will give this error, otherwise, it's fine... I kept pasting the same url each time I tried it and of course didn't notice the space at the end. Doh! - that was a mistake

Lemme know if this happens for others?
 Quote

All times are EST. The time is now 09:49 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content