RE: problem of retrieving urls from mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 "http://";, you could either store them in the database that way or
echo 'http://' . $temp;

hope this helps.


Edward Gray
Web Development Team
University of Mary Washington
540-654-1564

>>> "Bastien Koert" <bastien_k@xxxxxxxxxxx> 12/06/05 1:44 PM >>>
$url = str_replace("www.mydomain.com","",$url)

bastien


>From: Mohamed Yusuf <myainab@xxxxxxxxx>
>To: php-db@xxxxxxxxxxxxx 
>Subject:  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 url + the other url, Instead I should get another url only
>
>$temp = linkurl;
>echo "$temp";
>
>the echo prints something like this
>http://www.mydomain.com/www.otherlink.com 
>
>so I wan get rid off my url and get only other link, so how can I do that?
>
>thanks in advance

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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux