PHP FILTER_VALIDATE_URL Maximum Length? -


i have code validate whether url inputted valid...

if(filter_var($param1, filter_validate_url) === false){     echo "invalidurl";     exit(); } 

but when testing long-yet-valid url says it's invalid...

http://www.thisurlislongthisurlislongthisurlislongthisurlislongthisurlislongthisurlislongthisurlislongthisurlislongthisurlislong.com

anyone have ideas why? can't find in filter_validate_url says should consider url of length invalid, deleting characters deemed valid. thoughts!

sorry all, found after little more research...

"according rfc 1034, each part of domain name label cannot exceed 63 characters."

(source: http://grokbase.com/t/php/php-git-pulls/149gqytbpr/pr-php-src-826-master-filter-validate-url-check-max-length-of-domain-name-label).

so wasn't valid url after - done php!


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -