- Timestamp:
- Jul 1, 2006 11:37:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/2.0.2/lib/Utilities.inc.php
r111 r193 734 734 * Takes a URL and returns it without the query or anchor portion 735 735 * 736 * @param string $url any kind of URI737 * @return string the URI with ? or # and everything after removed736 * @param string $url Any kind of URI. 737 * @return string The URI with everything after ? or # removed. 738 738 */ 739 739 function stripQuery($url) … … 745 745 * Returns the remote IP address, taking into consideration proxy servers. 746 746 * 747 * @param bool $dolookup If true we resolve to IP to a host name, 748 * if false we don't. 749 * @return string IP address if $dolookup is false or no arg 750 * Hostname if $dolookup is true 747 * @param bool $dolookup If true we resolve the IP to a host name, if false we don't. 748 * @return string IP address if $dolookup is false, hostname if $dolookup is true 751 749 */ 752 750 function getRemoteAddr($dolookup=false) … … 759 757 } 760 758 } 761 return $dolookup && '' != $ip ? gethostbyaddr($ip) : $ip;759 return $dolookup && '' != $ip ? @gethostbyaddr($ip) : $ip; 762 760 } 763 761
Note: See TracChangeset
for help on using the changeset viewer.