I’m working on this social media website and want to put a video in a user’s post if they post a YouTube link. The code is complicated but the youtube player is called [php]include(‘video.php?v=***********’)[/php]. The *'s stand for the video code. For example. video.php?v=3JV74i4yvcA, or video.php?v=Swfu7aHuxkM.
Code for comment generator:
[php]
[/php]
This is put through javascript and it outputs to the main page. What I want to happen is if a youtube link exist in the Message/comment it will include the video.php file with the correct video.