Hello bats,
on Tue, 20. Apr 2004 at 23:09:59 -0700 Januk Aggarwal wrote:
did not read the whole thread, but have comments anyway.. ;)
> It just occurred to me, if you're using PHP, can't you get all the
> info you need without using regexps?
The global $_SERVER array contains all the headers stuff.
> You can do that with the chunk that I wrote. What I don't know is how
> php handles regexps.
Perl syntax (preg_match) and ereg(-) ("standard" regex).
> I know in VBScript, when you do a regexp, all possible matches are
> stored in an array, so it is pretty easy to get out all the parts you
> want.
preg_match_all(-), preg_split(-).
>> I didn't check an Apache server (I'll do that tomorrow) to
>> see how it outputs its HTTP headers.
----->8--------------------------------------------------------
HTTP/1.1 200 OK
Date: Fri, 23 Apr 2004 12:29:32 GMT
Server: Apache/1.3.29 (Win32) PHP/4.3.5
X-Powered-By: PHP/4.3.5
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----->8--------------------------------------------------------
HTH.
--
shinE!
GnuPG/PGP key: http://thequod.de/danielhahler.asc
Lifted with The Bat! 2.10.01 on Windows XP Service Pack 1.
Random software tip: [***] jEdit, for software development
(http://www.jedit.org)
________________________________________________________
http://www.silverstones.com/thebat/TBUDLInfo.html