you should then check the strings provided by your users. you can do this
before or after the link is added to your database.
use a regex to verify that the url provided is a full url (starting with
'http://', etc.). if it is not, then prepend 'http://'. i would recommend
doing this before s
I am getting link from visitor using form, that means I don't have control
what they would type. e.g they may type
http://www.suggestedlink.com/myfav.wav, www.suggestedlink.com/myfav.ram and
http://suggestedlink.com/myfav.mp3 or so I am looking general version which
can handle all.
and on top of
actually, you may want to check the source of the page. if the url does not
start with "http://"; (or https, or ftp, etc.), browsers will assume the link is
on the current server. how are you storing the urls? as full urls, as
domain/path/file.htm, ? if all of your urls should start with
$url = str_replace("www.mydomain.com","",$url)
bastien
From: Mohamed Yusuf <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] problem of retrieving urls from mysql
Date: Tue, 6 Dec 2005 09:51:18 -0800
I would like to store and retrieve urls, but I have problem which is I get
my ur