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? Quote Link to comment Share on other sites More sharing options...
MemphiS Posted July 7, 2007 Author Share Posted July 7, 2007 bumP! Quote Link to comment Share on other sites More sharing options...
MemphiS Posted July 7, 2007 Author Share Posted July 7, 2007 ??? Quote Link to comment Share on other sites More sharing options...
MemphiS Posted July 8, 2007 Author Share Posted July 8, 2007 ... Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.