ianric Posted September 18, 2008 Share Posted September 18, 2008 Hi I have installed the User tracking with Admin contrib but getting this error Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not in a.b.c.d form in admin\user_tracking.php on line 304 I've searched but found nothing helpfull. Not even with Google. This is the code before and after line 304 <?php $today = getdate(); $midnight = mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']); ?> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_ENTRY_TIME; ?></b></td> <td class="dataTableContent" colspan="2" valign="top"><?php echo date('d/m/Y H:i:s', $ut['value']['time_entry']); ?></td> <td class="dataTableContent" align="right" valign="top"><b><?php echo TEXT_IDLE_TIME ?></b></td> <td class="dataTableContent" colspan="2" valign="top"><?php echo date('H:i:s', ($midnight + time() - $ut['value']['end_time'])); ?></td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_END_TIME; ?></b></td> <td class="dataTableContent" colspan="2" valign="top"><?php echo date('d/m/Y H:i:s', $ut['value']['end_time']); ?></td> <td class="dataTableContent" align="right" valign="top"><b><?php echo TEXT_TOTAL_TIME ?></b></td> <td class="dataTableContent" colspan="2" valign="top"><b><?php echo date('H:i:s', ($midnight + $ut['value']['end_time'] - $ut['value']['time_entry'])); ?></b></td> </tr> </table> </td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_COUNTRY ?></b></td> <td class="dataTableContent" valign="top"><?php echo tep_image(DIR_WS_FLAGS . strtolower(geoip_country_code_by_addr($gi, $ut['value']['ip_address'])) . '.gif', geoip_country_name_by_addr($gi, $ut['value']['ip_address'])); ?> <?php echo geoip_country_name_by_addr($gi, $ut['value']['ip_address']); ?></td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_IP_ADDRESS ?></b></td> <td class="dataTableContent" valign="top"><?php echo '<a href="' . USER_TRACKING_WHOIS_URL . $ut['value']['ip_address']; ?>" target="_new"><?php echo $ut['value']['ip_address']; ?></a></td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_HOST ?></b></td> **this is line 304 <td class="dataTableContent" valign="top"><?php echo gethostbyaddr($ut['value']['ip_address']); ?></td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TEXT_ORIGINATING_URL ?></b></td> <?php $ref_name = chunk_split($referer_url,40,"<br>"); ?> <td class="dataTableContent" align="left" valign="top" colspan=3><?php echo '<a href="'. $ut['value']['referer_url'] .'" target="_new">'. wordwrap($ut['value']['referer_url'], 70, "<br>", 1) .'</a>'; ?> </td> </tr> <tr> <td class="dataTableContent"></td> <td class="dataTableContent" colspan=3> <table border="0" cellspacing="1" cellpadding="2" bgcolor=999999 width=100%> <?php // View session if ($_GET['viewsession'] != '' && $_GET['viewsession'] == $ut['value']['session_id']){ while (($pu = each($ut['value']['last_page_url']))&&($du = each($ut['value']['page_desc']))) { ?> Also, the flags don't show. There's just a red cross and right click - properties says /images/flags/.gif (that is flags/DOTGIF) so it's missing the country prefix or whatever. Hope someone can help Cheers ian Link to comment Share on other sites More sharing options...
ianric Posted September 19, 2008 Author Share Posted September 19, 2008 Hi I have installed the User tracking with Admin contrib but getting this error Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not in a.b.c.d form in admin\user_tracking.php on line 304 I've searched but found nothing helpfull. Not even with Google. This is the code before and after line 304 <?php $today = getdate(); $midnight = mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']); ?> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_ENTRY_TIME; ?></b></td> <td class="dataTableContent" colspan="2" valign="top"><?php echo date('d/m/Y H:i:s', $ut['value']['time_entry']); ?></td> <td class="dataTableContent" align="right" valign="top"><b><?php echo TEXT_IDLE_TIME ?></b></td> <td class="dataTableContent" colspan="2" valign="top"><?php echo date('H:i:s', ($midnight + time() - $ut['value']['end_time'])); ?></td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_END_TIME; ?></b></td> <td class="dataTableContent" colspan="2" valign="top"><?php echo date('d/m/Y H:i:s', $ut['value']['end_time']); ?></td> <td class="dataTableContent" align="right" valign="top"><b><?php echo TEXT_TOTAL_TIME ?></b></td> <td class="dataTableContent" colspan="2" valign="top"><b><?php echo date('H:i:s', ($midnight + $ut['value']['end_time'] - $ut['value']['time_entry'])); ?></b></td> </tr> </table> </td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_COUNTRY ?></b></td> <td class="dataTableContent" valign="top"><?php echo tep_image(DIR_WS_FLAGS . strtolower(geoip_country_code_by_addr($gi, $ut['value']['ip_address'])) . '.gif', geoip_country_name_by_addr($gi, $ut['value']['ip_address'])); ?> <?php echo geoip_country_name_by_addr($gi, $ut['value']['ip_address']); ?></td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_IP_ADDRESS ?></b></td> <td class="dataTableContent" valign="top"><?php echo '<a href="' . USER_TRACKING_WHOIS_URL . $ut['value']['ip_address']; ?>" target="_new"><?php echo $ut['value']['ip_address']; ?></a></td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TABLE_HEADING_HOST ?></b></td> **this is line 304 <td class="dataTableContent" valign="top"><?php echo gethostbyaddr($ut['value']['ip_address']); ?></td> </tr> <tr> <td class="dataTableContent" align="right" valign="top"><b><?php echo TEXT_ORIGINATING_URL ?></b></td> <?php $ref_name = chunk_split($referer_url,40,"<br>"); ?> <td class="dataTableContent" align="left" valign="top" colspan=3><?php echo '<a href="'. $ut['value']['referer_url'] .'" target="_new">'. wordwrap($ut['value']['referer_url'], 70, "<br>", 1) .'</a>'; ?> </td> </tr> <tr> <td class="dataTableContent"></td> <td class="dataTableContent" colspan=3> <table border="0" cellspacing="1" cellpadding="2" bgcolor=999999 width=100%> <?php // View session if ($_GET['viewsession'] != '' && $_GET['viewsession'] == $ut['value']['session_id']){ while (($pu = each($ut['value']['last_page_url']))&&($du = each($ut['value']['page_desc']))) { ?> Also, the flags don't show. There's just a red cross and right click - properties says /images/flags/.gif (that is flags/DOTGIF) so it's missing the country prefix or whatever. Hope someone can help Cheers ian Me again. No need to worry, solved Cheers ian Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.