This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can you tell me how I check user submitted URL has a protocol in PHP?
02-26-2013, 09:51 AM
Post: #1
Can you tell me how I check user submitted URL has a protocol in PHP?
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)

Ads

Find all posts by this user
Quote this message in a reply
02-26-2013, 09:54 AM
Post: #2
 
parse_url method is helpful

http://php.net/manual/en/function.parse-url.php

Ads

Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)