the-dream
05-11-2008, 11:59 PM
Hi,
I have a string that will contain a URL, this url will eventually be processed and needs to be in the format:
http://www.
how would i check if it is written differently and rewrite it to that format if it is different...
for example someone enters http://www.google.com/ the script does nothing.
someone enters www.google.com/ the script adds http://
someone enters http://google.com/ the script adds www.
someone enters google.com/ the script adds http://www.
is there any premade/easy ways to do this, or if you have a function that you have made that would be great...
I have a string that will contain a URL, this url will eventually be processed and needs to be in the format:
http://www.
how would i check if it is written differently and rewrite it to that format if it is different...
for example someone enters http://www.google.com/ the script does nothing.
someone enters www.google.com/ the script adds http://
someone enters http://google.com/ the script adds www.
someone enters google.com/ the script adds http://www.
is there any premade/easy ways to do this, or if you have a function that you have made that would be great...