Jump to content

Best eregi() URL Validator


AXiSS

Recommended Posts

I want to use eregi() to check for a correct url. I want to allow people to enter subdomains, domains, and directories, but no specific files, like any of these would be valid:

 

test.url

sub.test.url

test.url/sub/

sub.test.url/sub/

 

The http:// will be added after validation. What would be the best way to validate that with eregi()?

Link to comment
https://forums.phpfreaks.com/topic/38024-best-eregi-url-validator/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.