• Currently I am developing a magazine portal in which its homepage may have different video sections related to posts. Rather than attaching the actual post, I am trying to automatically embed the video included in the post without editing the homepage everytime and without getting the post content but the video. Do you think that this is possible?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    It’s possible. Get the post’s content as usual. Use preg_match() to parse out just the desired URL by matching distinct elements in content that distinguish video embeds from other content. The regular expression matching used can extract out certain elements independent of those matched.

Viewing 1 replies (of 1 total)

The topic ‘Get a video automatically from a post’ is closed to new replies.