Can you tell me how I check user submitted URL has a protocol in PHP? - Printable Version +- Twitist Forums (http://twitist.com) +-- Forum: Twitter forums (/forum-1.html) +--- Forum: Twitter General help (/forum-6.html) +--- Thread: Can you tell me how I check user submitted URL has a protocol in PHP? (/thread-63199.html) |
Can you tell me how I check user submitted URL has a protocol in PHP? - Tharanga - 02-26-2013 09:51 AM I have a form to get some urls from users. Eg: web address, facebook address, twitter address etc. Then I need to check user may or may not enter the protocol as part of the address. If it is not with url I need to add protocol to it. (http) - CHANGE - 02-26-2013 09:54 AM parse_url method is helpful http://php.net/manual/en/function.parse-url.php |