yyx748 Posted August 4, 2009 Share Posted August 4, 2009 This is my RSS managed to work except for one last thing.... all relative links arent working properly, namely links and images. http://www.phyllisquek.com/feed/test/ How do i correct it? All my web links are in relative, example, /content/image.jpg I tired str replace by replacing all src=" and href=" to src="www.exmaple.com/ and href="www.example.com/ But this would screw up all external links and images like http://www.cnn.com Help! :'( Link to comment https://forums.phpfreaks.com/topic/168808-convert-relative-to-absolute-links/ Share on other sites More sharing options...
patrickmvi Posted August 4, 2009 Share Posted August 4, 2009 You'd probably want to look at preg_replace to do what you're looking to do. You'd need to build a regular expression that would take care of it. You can get more info on preg_replace here: http://www.php.net/preg_replace Link to comment https://forums.phpfreaks.com/topic/168808-convert-relative-to-absolute-links/#findComment-890616 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.