Đang Thực Hiện

159092 PHP: Validate URL 100%

I need a 100% URL validation function.

Example:

http;//[url removed, login to view] INVALID

http;//[url removed, login to view] VALID

http;//[url removed, login to view] VALID

http;//[url removed, login to view] INVALID

http://directory/ INVALID

http;//domain./invalid

http;//[url removed, login to view] VALID

http;//[url removed, login to view] VALID

http;//[url removed, login to view] VALID

http;//folder/[url removed, login to view] INVALID

The problem is that a normal regex wont do the job cause http;//[url removed, login to view] would be as valid as http;//[url removed, login to view] as you normally cant tell the difference.

So the idea is having all existing extensions in an array (the list of all extensions can be found at [url removed, login to view]) and then doing a check like

if the url is like

http://*ANYTHINGHERE.{ALLOWEDEXTENSIONS}

then its VALID

I also need another check performed to see if I want to store the domain name or not.

I only want to store either a domain name like http;//[url removed, login to view] or http;//[url removed, login to view] or http;//[url removed, login to view] (with or without ending slash) or the following file extensions:

.php

.asp

.htm

.jsp

.pl

.cgi

.shtml

.dhtml

.jhtml

.cfm

.xhtm

The extensions must be checked case insensitive meaning if the extension is .html the .htm rule will catch it. Same for .php or .phps or .php3 or .php4 and so on

I have wasted a lot of money into this before but no solution worked as expected. The budget for this project is max. 25$ as it's really not much work.

I need a demo on your server where I can enter a domain string to see the result of your work prior accepting your bid. I will pick the first programmer who provides a fully working demo within my budget (i know its not much but the job is not a lot of work either).

I have uploaded a file to save you a lot of work.

The file contains two arrays. One array contains all domain extensions and the other array contains all allowed file extensions. However please make sure the domain is valid even if it is a directory or just [url removed, login to view] or [url removed, login to view]

Kỹ năng: Bất kì công việc gì, PHP

Xem thêm: two string problem, string problem, regex is, regex example, php string html, htm programmer, slash s, url list, regex, php regex, cgi php server, url name, problem regex php, php file array, php regex html, php list directory, list url, array validation, validation array, php list file directory, function check php, function jsp, max case, url html, html regex

Về Bên Thuê:
( 37 nhận xét ) Amsterdam, Netherlands

Mã Dự Án: #1905281