<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: YouTube Video URL converted to YouTube Embed Code</title>
		<link>https://legacy.forums.gravityhelp.com/topic/youtube-video-url-converted-to-youtube-embed-code</link>
		<description>Gravity Support Forums Topic: YouTube Video URL converted to YouTube Embed Code</description>
		<language>en-US</language>
		<pubDate>Mon, 20 Apr 2026 01:24:55 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/youtube-video-url-converted-to-youtube-embed-code" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "YouTube Video URL converted to YouTube Embed Code"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/youtube-video-url-converted-to-youtube-embed-code#post-69030</link>
			<pubDate>Wed, 01 Aug 2012 16:33:15 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">69030@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thank you for the update.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>scottidesign on "YouTube Video URL converted to YouTube Embed Code"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/youtube-video-url-converted-to-youtube-embed-code#post-68994</link>
			<pubDate>Wed, 01 Aug 2012 13:51:38 +0000</pubDate>
			<dc:creator>scottidesign</dc:creator>
			<guid isPermaLink="false">68994@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks, I was approaching this problem from Gravity Forms doing the work.&#60;/p&#62;
&#60;p&#62;However, using this solution I made another plugin (the plugin that is displaying the video) use this code to pass the video (that Gravity forms got) to my own custom embed in PHP.&#60;/p&#62;
&#60;p&#62;Thanks for the help.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "YouTube Video URL converted to YouTube Embed Code"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/youtube-video-url-converted-to-youtube-embed-code#post-68832</link>
			<pubDate>Tue, 31 Jul 2012 17:25:23 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">68832@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;This is not related at all to Gravity Forms, but I've done this before so I can point you in the right direction.  See this StackExchange post:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://stackoverflow.com/questions/3392993/php-regex-to-get-youtube-video-id&#34; rel=&#34;nofollow&#34;&#62;http://stackoverflow.com/questions/3392993/php-regex-to-get-youtube-video-id&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Specifically:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;[php]
$url = &#38;quot;http://www.youtube.com/watch?v=C4kxS1ksqtw&#38;amp;feature=relate&#38;quot;;
parse_str( parse_url( $url, PHP_URL_QUERY ), $my_array_of_vars );
echo $my_array_of_vars[&#38;#39;v&#38;#39;];
  // Output: C4kxS1ksqtw&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;That &#60;em&#62;parse_str&#60;/em&#62; will work to return the video ID.  You will have to change this code example to get $url from your form field, and you likely won't echo &#60;em&#62;$my_array_of_vars['v']&#60;/em&#62; but will use that in your embed code.  &#60;/p&#62;
&#60;p&#62;Hope that helps.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>scottidesign on "YouTube Video URL converted to YouTube Embed Code"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/youtube-video-url-converted-to-youtube-embed-code#post-68819</link>
			<pubDate>Tue, 31 Jul 2012 16:33:29 +0000</pubDate>
			<dc:creator>scottidesign</dc:creator>
			<guid isPermaLink="false">68819@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello support forum,&#60;/p&#62;
&#60;p&#62;I want my users to be able to input a URL to a YouTube video, then get only the ID, so that I can embed it how I want into a post (autoplay, size, HD).&#60;/p&#62;
&#60;p&#62;For example user enters:&#60;br /&#62;
&#60;code&#62;&#60;a href=&#34;http://www.youtube.com/watch?v=ALEUp3kXvvk&#34; rel=&#34;nofollow&#34;&#62;http://www.youtube.com/watch?v=ALEUp3kXvvk&#60;/a&#62;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Then I want to take that and only use the ID of the video which is ALEUp3kXvvk and insert it into my custom embed:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;iframe src=&#38;quot;http://www.youtube.com/embed/ALEUp3kXvvk?rel=0&#38;amp;autoplay=1&#38;amp;showinfo=0&#38;amp;controls=0&#38;amp;HD=1&#38;amp;modestbranding=1&#38;quot; frameborder=&#38;quot;0&#38;quot; width=&#38;quot;560&#38;quot; height=&#38;quot;315&#38;quot;&#38;gt;&#38;lt;/iframe&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Any help or direction would be much appreciated.&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
