note 47046 added to function.eregi
| From: | gabrielatgabrielharrisoncouk at osu1 dot php dot net | Date: | Mon, 01 Nov 2004 12:19:33 +0000 |
| Subject: | note 47046 added to function.eregi | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79435@lists.php.net to get a copy of this message | ||
There is a bug in the regex that means it doesn't work with a domain suffex that has two parts
eg: .co.uk
I'm not good enough with regexs to sort this - sorry.
There can also be a problem if the domain doesn't have a domain entry without the www.
subdomain. To solve this modify the code with:
elseif( gethostbyname($regs[2]) == $regs[2] ||
gethostbyname('www' . $regs[2]) == 'www' . $regs[2])
----
Manual Page -- http://www.php.net/manual/en/function.eregi.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47046
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47046&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47046&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47046&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47046&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47046&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47046&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47046&report=yes
Search -- http://master.php.net/manage/user-notes.php