Re: Package proposal: Net_Ip (merge w/ HTTP?)
| From: | cagrET | Date: | Sat, 31 May 2003 15:16:02 +0000 |
| Subject: | Re: Package proposal: Net_Ip (merge w/ HTTP?) | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-16854@lists.php.net to get a copy of this message | ||
> It's fairly specific to a web application. To me, this almost seems like
> it should probably reflect that it's more to do with HTTP header/env
> parsing. I think a better candidate for this functionality would be the
> HTTP class.
there is nor problem, can go to HTTP if its ok
> It looks fairly straight-forward, but if you're going to wrapper
> gethostbyname and gethostbyaddr, you should probably test to see if the
> the lookup failed:
>
> return (($ip = gethostbyname($host)) != $host ? $ip : FALSE);
k, i have updated
> or something like that. I'd also recommend renaming getHost and getAddr
> to getRemoteHost/Addr. If it is to stay separate from HTTP, how about
> HTTP_RemoteHost or something?
getRemoteHost() etc updated
If its ok, it can go to HTTP
Some ppl want to call it statically, I can do it also ...
Ok, so what to do now, to merge it with HTTP etc ?
cheers,
--
cagrET