Re: HTTP_Client

From: Date: Mon, 22 Apr 2002 06:57:06 +0000
Subject: Re: HTTP_Client
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5718@lists.php.net to get a copy of this message
On Sun, 2002-04-21 at 23:53, Dan Allen wrote: > > why reinvent the wheel? > Two reasons...one, mine follows a very well defined standard (the > mozilla detection package, and as such I can just update mine when > they update theirs) and second the code for phpsniff.sourceforge.net > is ugly, non-pearified and not well defined. Plus, I implemented > ideas from Horde, which for all intents and purposes are brilliant. > > So how about Net_UserAgent and we can call it final? Hey people, > worse comes to worse we can always rename it/move it. It isn't like > we are trying to decide where to build a house? Thanks for all the > responses! > > What do you say Stig, happy with Net_UserAgent for now? As the package name, yes, but not as the class name. Richard, what do you think about folding HTTP_Request into Net_UserAgent? IMHO the class relationship is as follows: $ua = new Net_UserAgent("agentstring"); $request1 = $ua->makeRequest($url1); $request2 = $ua->makeRequest($url2); $response1 = $ua->sendRequest($request1); $response2 = $ua->sendRequest($request2); For browser detection it could be something ala: $detector = new Net_UserAgent_Detect($_SERVER['HTTP_USER_AGENT']); $capabilities = $detector->getCapabilities(); - Stig

« previous php.pear.dev (#5718) next »