Hi gang

Finally I've got the time to finish up my guestbook script ... so little left that I can actually see the light at the end of the tunnel now..

The guestbook data is stored in a text file. When opening the guestbook, this file is parsed and the named fields are used to construct different HTML structures according to which optional information signers have entered.

One of the optional fields is an URL, and rather than enforcing a specific format, I'd like to have the script, in as much as possible, to automagically correctify the URL as far as possible without reaching too far into guessing and assumption...

I mean, I want the script to automagically add http:// when needed, turn slashes the right way, and remove excess double slashes ... but I'm uncertain as to what else I can/should make it do automatically, and what I shouldn't ...

Also, I'm not sure which characters and structures are actually permitted/required in a "legal" URL, so I'm not sure what I should make it look for to detect an impossible URL ...

Anyone able to offer some help here?

I know I could've probably just picked up someone's script out there ... but I'm trying to do it on my own, as I figure I'd learn more that way ...

Rene
--
Rene Brehmer
aka Metalbunny

http://metalbunny.net/
References, tools, and other useful stuff...


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to