PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hey guys, i have this php code, that i took from a guide on how to embed youtube URLs automatically on my website. The problem is though that the code only needs two thirds of the URL and therefore leaves the rest as normal text (it's from &feature to the end in the URL). Is it possible to add something to the script so it removes the URL-text, or does i have to write a comment above telling the users to manually delete it?
What exactly will $_POST['content'] contain? Will it be a bunch of other content with a full URL to youtube in the middle of it, or just be the URL only?
It was funny, the code you originally posted remind me on how I used to write things before learning Regex.
There was also a 3rd variation of the youtube code, but it was mainly when you were logged into your own youtube account and viewing your own videos. Had a client that found that for me when I only programmed it for the two formats I just did here. (I had the admin set that if they posted a video link, and it didn't match, it would e-mail me.)