Jump to content

Using regex pregmatch to read youtube video ID from url


physaux

Recommended Posts

Hey guys, I am trying to write some code to get the referring url to my page, and then do something unique accordingly. So here is my code so far:

$ref = getenv("HTTP_REFERER");
$goodvideoID = xxxxxxxxx //11 characters long

 

How can I check if the goodvideoID is in the ref url? I am trying with preg match but I keep getting errors...  :'(

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.