MemphiS Posted July 7, 2007 Share Posted July 7, 2007 Ive created a function which checks if the image is valid... i use bbcodes like below.. function bbcode($code){ str_replace("[img]http://","<img src='",$code); str_replace("[/img]","' border='0'>",$code); return $code; } but i havent worked out how i can use my image function validator to check the specific url between Anyone know how i can get this working or an alternative to verifying it? Link to comment https://forums.phpfreaks.com/topic/58831-bbcodes-with-img-tag/ Share on other sites More sharing options...
MemphiS Posted July 7, 2007 Author Share Posted July 7, 2007 bumP! Link to comment https://forums.phpfreaks.com/topic/58831-bbcodes-with-img-tag/#findComment-291878 Share on other sites More sharing options...
MemphiS Posted July 7, 2007 Author Share Posted July 7, 2007 ??? Link to comment https://forums.phpfreaks.com/topic/58831-bbcodes-with-img-tag/#findComment-291932 Share on other sites More sharing options...
MemphiS Posted July 8, 2007 Author Share Posted July 8, 2007 ... Link to comment https://forums.phpfreaks.com/topic/58831-bbcodes-with-img-tag/#findComment-292373 Share on other sites More sharing options...
GingerRobot Posted July 8, 2007 Share Posted July 8, 2007 You're going to need to use regular expressions for this. Although, as you have done, you can replace parts of the text with str_replace, if you use the ereg() or preg_match() functions, you can also return text between the two things. There are a couple of tutorials on this site for this sort of thing too. You might find them useful: http://www.phpfreaks.com/tutorials/141/0.php http://www.phpfreaks.com/tutorials/123/0.php Link to comment https://forums.phpfreaks.com/topic/58831-bbcodes-with-img-tag/#findComment-292396 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.