<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>HTML Tutorial - Cody Paste</title>
	<atom:link href="https://www.codypaste.com/category/html-2/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codypaste.com/category/html-2/</link>
	<description>THE WEB PLAYGROUND</description>
	<lastBuildDate>Sat, 23 Nov 2024 10:28:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>

<image>
	<url>https://www.codypaste.com/wp-content/uploads/2022/12/cropped-codypaste-32x32.png</url>
	<title>HTML Tutorial - Cody Paste</title>
	<link>https://www.codypaste.com/category/html-2/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Disable the button when the form is submitted</title>
		<link>https://www.codypaste.com/disable-the-button-when-the-form-is-submitted/</link>
					<comments>https://www.codypaste.com/disable-the-button-when-the-form-is-submitted/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Sat, 23 Nov 2024 10:27:01 +0000</pubDate>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[CodeIgniter 4]]></category>
		<category><![CDATA[HTML]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1223</guid>

					<description><![CDATA[<p>Solution: Disable the button when the form is submitted. Re-enable the button after the page is loaded or when the form submission is complete. Example Implementation: HTML: [crayon-6985bb8ec63ab554480192/] JavaScript/jQuery: [crayon-6985bb8ec63b8151630167/] Explanation: Disabling the Submit Button on Form Submission: When the form is submitted ($('#myForm').submit()), we disable the submit button immediately ($('#submitButton').prop('disabled', true);) to prevent further &#8230; </p>
<p class="link-more"><a href="https://www.codypaste.com/disable-the-button-when-the-form-is-submitted/" class="more-link">read more<span class="screen-reader-text"> "Disable the button when the form is submitted"</span></a></p>
<p>The post <a href="https://www.codypaste.com/disable-the-button-when-the-form-is-submitted/">Disable the button when the form is submitted</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h3>Solution:</h3>
<ol>
<li><strong>Disable the button when the form is submitted</strong>.</li>
<li><strong>Re-enable the button after the page is loaded or when the form submission is complete</strong>.</li>
</ol>
<h3>Example Implementation:</h3>
<h4>HTML:</h4>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;form id="myForm" method="POST" action="your-action-url"&gt;
    &lt;!-- Your form fields here --&gt;
    &lt;input type="submit" value="Submit" class="btn btn-lg btn-success" id="submitButton"&gt;
&lt;/form&gt;</pre><p></p>
<h2><strong>JavaScript/jQuery:</strong></h2>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">$(document).ready(function() {
    // Disable the submit button when the page starts loading or the form is being submitted
    $('#myForm').submit(function(event) {
        // Disable the submit button
        $('#submitButton').prop('disabled', true);
        
        // Optionally, change the button text to indicate submission
        $('#submitButton').val('Submitting...');
        
        // If you're submitting via Ajax, handle it like this:
        // $.ajax({
        //     url: 'your-action-url',
        //     type: 'POST',
        //     data: $(this).serialize(),
        //     beforeSend: function() {
        //         // Disable the button before sending the request
        //         $('#submitButton').prop('disabled', true);
        //     },
        //     success: function(response) {
        //         // Handle successful form submission here
        //         // Re-enable the button if needed (or perform actions based on success)
        //         // $('#submitButton').prop('disabled', false);
        //         // $('#submitButton').val('Submit');
        //     },
        //     error: function() {
        //         // Handle error response
        //         // Re-enable the button in case of an error
        //         // $('#submitButton').prop('disabled', false);
        //         // $('#submitButton').val('Submit');
        //     }
        // });
        
        // For traditional form submission, we can rely on the browser's default behavior
    });
    
    // Disable button if the page is being loaded
    $(window).on('beforeunload', function() {
        $('#submitButton').prop('disabled', true);
    });
});</pre><p></p>
<h3>Explanation:</h3>
<ol>
<li><strong>Disabling the Submit Button on Form Submission:</strong>
<ul>
<li>When the form is submitted (<code>$('#myForm').submit()</code>), we disable the submit button immediately (<code>$('#submitButton').prop('disabled', true);</code>) to prevent further clicks.</li>
</ul>
</li>
<li><strong>Changing the Button Text:</strong>
<ul>
<li>Optionally, you can change the button text to &#8220;Submitting&#8230;&#8221; or something else to give feedback to the user that the form is being processed.</li>
</ul>
</li>
<li><strong>Re-enabling the Button After Submission (Using Ajax):</strong>
<ul>
<li>If you&#8217;re using Ajax, you can re-enable the button when the submission is successful or if there&#8217;s an error by placing the code <code>$('#submitButton').prop('disabled', false);</code> in the success/error callbacks.</li>
</ul>
</li>
<li><strong>Disabling the Button on Page Reload or Unload:</strong>
<ul>
<li><strong><code>$(window).on('beforeunload', function() {...})</code></strong>: This disables the button if the page is being unloaded, which could happen when the user reloads or navigates away while the form is submitting. This will prevent the form from being accidentally submitted multiple times due to a page reload.</li>
</ul>
</li>
</ol>
<h3>Additional Notes:</h3>
<ul>
<li><strong>For Ajax Submissions:</strong> You can use the <code>beforeSend</code> function in the Ajax request to disable the button before sending the request, and re-enable it on the success or error response.</li>
<li><strong>For Traditional Form Submissions:</strong> The button will be disabled immediately on form submission, and the page reloads automatically once the form is submitted. After the page reloads, the button will be active again (if you set it to be enabled on page load).</li>
</ul>
<p>The post <a href="https://www.codypaste.com/disable-the-button-when-the-form-is-submitted/">Disable the button when the form is submitted</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/disable-the-button-when-the-form-is-submitted/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Product Zoom Gallery for e-commerce</title>
		<link>https://www.codypaste.com/product-gallery-for-e-commerce/</link>
					<comments>https://www.codypaste.com/product-gallery-for-e-commerce/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Sat, 24 Aug 2024 07:56:52 +0000</pubDate>
				<category><![CDATA[Cool Effect]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1161</guid>

					<description><![CDATA[<p>e-commerce product zoom gallery https://codepen.io/hckkiu/pen/poyoRKQ https://codepen.io/danielhuangg/pen/xqaMrM https://codepen.io/ZowWeb/pen/xxGLrjp https://codepen.io/exclutips/pen/LYEeEjZ</p>
<p>The post <a href="https://www.codypaste.com/product-gallery-for-e-commerce/">Product Zoom Gallery for e-commerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>e-commerce product zoom gallery</p>
<ol>
<li><a href="https://codepen.io/hckkiu/pen/poyoRKQ" target="_blank" rel="noopener">https://codepen.io/hckkiu/pen/poyoRKQ</a></li>
<li><a href="https://codepen.io/danielhuangg/pen/xqaMrM" target="_blank" rel="noopener">https://codepen.io/danielhuangg/pen/xqaMrM</a></li>
<li><a href="https://codepen.io/ZowWeb/pen/xxGLrjp" target="_blank" rel="noopener">https://codepen.io/ZowWeb/pen/xxGLrjp</a></li>
<li><a href="https://codepen.io/exclutips/pen/LYEeEjZ" target="_blank" rel="noopener">https://codepen.io/exclutips/pen/LYEeEjZ</a></li>
</ol>
<p>The post <a href="https://www.codypaste.com/product-gallery-for-e-commerce/">Product Zoom Gallery for e-commerce</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/product-gallery-for-e-commerce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>HTML Form Select Menu Styling</title>
		<link>https://www.codypaste.com/html-form-select-menu-styling/</link>
					<comments>https://www.codypaste.com/html-form-select-menu-styling/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Aug 2024 07:22:04 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML Tips]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1158</guid>

					<description><![CDATA[<p>Here we will see how to style HTML Form  &#60;select&#62; menu. [crayon-6985bb8ec6d17389355547/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/html-form-select-menu-styling/">HTML Form Select Menu Styling</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here we will see how to style HTML Form  &lt;select&gt; menu.</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
    &lt;title&gt;Custom Select Dropdown&lt;/title&gt;
    &lt;style&gt;
        /* Hide the native select */
        select {
            display: none;
        }

        /* Style the select wrapper */
        .select-wrapper {
            position: relative;
            width: 200px;
            cursor: pointer;
        }

        .selected-option {
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
            background-color: #fff;
            color: #333;
            font-size: 16px;
        }

        .select-wrapper::after {
            content: '▼';
            position: absolute;
            top: 50%;
            right: 10px;
            transform: translateY(-50%);
            pointer-events: none;
            color: #333;
        }

        /* Custom dropdown styling */
        .custom-select {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            width: 100%;
            background-color: #fff;
            border: 1px solid #ccc;
            border-radius: 0 0 5px 5px;
            z-index: 1;
        }

        .custom-select .option {
            padding: 10px;
            cursor: pointer;
        }

        .custom-select .option:hover {
            background-color: red;
            color: #fff;
        }

        /* Highlight the selected option */
        .custom-select .option.selected {
            background-color: red;
            color: #fff;
        }

        /* Show dropdown when wrapper is active */
        .select-wrapper.active .custom-select {
            display: block;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class="select-wrapper"&gt;
        &lt;div class="selected-option"&gt;Select an option&lt;/div&gt;
        &lt;select&gt;
            &lt;option value="1"&gt;Option 1&lt;/option&gt;
            &lt;option value="2"&gt;Option 2&lt;/option&gt;
            &lt;option value="3"&gt;Option 3&lt;/option&gt;
            &lt;option value="4"&gt;Option 4&lt;/option&gt;
        &lt;/select&gt;
        &lt;div class="custom-select"&gt;
            &lt;div class="option" data-value="1"&gt;Option 1&lt;/div&gt;
            &lt;div class="option" data-value="2"&gt;Option 2&lt;/div&gt;
            &lt;div class="option" data-value="3"&gt;Option 3&lt;/div&gt;
            &lt;div class="option" data-value="4"&gt;Option 4&lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;script&gt;
        const selectWrapper = document.querySelector('.select-wrapper');
        const selectElement = document.querySelector('select');
        const selectedOption = document.querySelector('.selected-option');
        const customSelect = document.querySelector('.custom-select');

        // Handle option click
        customSelect.querySelectorAll('.option').forEach(option =&gt; {
            option.addEventListener('click', () =&gt; {
                const value = option.getAttribute('data-value');
                const text = option.textContent;
                selectedOption.textContent = text;
                selectElement.value = value; // Set the value of the hidden select element

                // Update custom dropdown to highlight the selected option
                customSelect.querySelectorAll('.option').forEach(opt =&gt; {
                    opt.classList.remove('selected');
                });
                option.classList.add('selected');

                selectWrapper.classList.remove('active');
            });
        });

        // Toggle dropdown visibility on selected option click
        selectedOption.addEventListener('click', () =&gt; {
            selectWrapper.classList.toggle('active');
        });

        // Hide dropdown when clicking outside
        document.addEventListener('click', (e) =&gt; {
            if (!selectWrapper.contains(e.target)) {
                selectWrapper.classList.remove('active');
            }
        });
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/html-form-select-menu-styling/">HTML Form Select Menu Styling</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/html-form-select-menu-styling/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>YouTube Channel Video API in PHP</title>
		<link>https://www.codypaste.com/youtube-channel-video-api-in-php/</link>
					<comments>https://www.codypaste.com/youtube-channel-video-api-in-php/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Mon, 27 May 2024 07:31:18 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1136</guid>

					<description><![CDATA[<p>How to load/list YouTube channel Videos? Here we will see how we can load YouTube channel video in our website by using JSON. Now we will start this from scratch STEP 1 (Get API Key): We will get &#8216;API Key&#8217; from Google Developer Console, you can find steps here : https://developers.google.com/youtube/v3/getting-started STEP 2 (Get Channel &#8230; </p>
<p class="link-more"><a href="https://www.codypaste.com/youtube-channel-video-api-in-php/" class="more-link">read more<span class="screen-reader-text"> "YouTube Channel Video API in PHP"</span></a></p>
<p>The post <a href="https://www.codypaste.com/youtube-channel-video-api-in-php/">YouTube Channel Video API in PHP</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>How to load/list YouTube channel Videos?</h1>
<p>Here we will see how we can load YouTube channel video in our website by using JSON.</p>
<h2><strong><span style="font-size: 24pt;">Now we will start this from scratch</span></strong></h2>
<p><span style="font-size: 18pt;"><strong>STEP 1 (Get API Key):</strong></span><br />
We will get &#8216;API Key&#8217; from Google Developer Console, you can find steps here : <span style="text-decoration: underline; color: #33cccc;"><a style="color: #33cccc; text-decoration: underline;" href="https://developers.google.com/youtube/v3/getting-started" target="_blank" rel="noopener">https://developers.google.com/youtube/v3/getting-started</a></span></p>
<p><span style="font-size: 18pt;"><strong>STEP 2 (Get Channel ID):</strong></span><br />
Go to your YouTube Channel and copy your channel URL e.g. <em>https://www.youtube.com/channel/XXXThs2cnzpDD-dT</em><br />
and your channel id is &#8216;<strong><em>XXXThs2cnzpDD-dT</em></strong>&#8216;.</p>
<p><strong><span style="font-size: 18pt;">Now see the complete code below</span></strong></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
    $api_key = 'XXXXXXXXC9eEmCnF4qXXXXX';
    $chanel_id = 'XXXnzpXXXXXXXXXXXc-dT'; // Youtube Channel ID, copy from url of channel 'https://www.youtube.com/channel/XXXnzpXXXXXXXXXXXc-dT'
    $maxResults = '20';
    
    $url    = 'https://www.googleapis.com/youtube/v3/search?key='.$api_key.'&amp;channelId='.$chanel_id.'&amp;part=snippet,id&amp;order=date&amp;maxResults=20';
    
    $ch = curl_init(); 
    curl_setopt($ch, CURLOPT_URL, $url); 
       
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    $result = curl_exec($ch); 
    if(curl_errno($ch) !== 0) { error_log('cURL error when connecting to ' . $url . ': ' . curl_error($ch)); } 
    curl_close($ch); 
    $videoLists = json_decode($result);
    //echo'&lt;pre&gt;';
    //print_r($videoLists);
    
    $videoList = $videoLists-&gt;items;
?&gt;

&lt;?php
    foreach($videoList as $videoListVal){
        ?&gt;
        &lt;div style="width:20%; float:left;"&gt;
            &lt;?php
                $thumb_url      = $videoListVal-&gt;snippet-&gt;thumbnails-&gt;medium-&gt;url; //mediaum,high,default
                $title          = $videoListVal-&gt;snippet-&gt;title;
                $description    = $videoListVal-&gt;snippet-&gt;description;
                $videoId        = $videoListVal-&gt;id-&gt;videoId;
                $publishTime    = $videoListVal-&gt;snippet-&gt;publishTime;
            ?&gt;
            &lt;iframe width="100%" height="auto" src="https://www.youtube.com/embed/&lt;?php echo $videoId; ?&gt;?si=ICtFe87ElbGLgdvm" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen&gt;&lt;/iframe&gt;
        &lt;/div&gt;
        &lt;?php
    }
    //echo'&lt;pre&gt;';
    //print_r($videoList);
?&gt;</pre><p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/youtube-channel-video-api-in-php/">YouTube Channel Video API in PHP</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/youtube-channel-video-api-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>YouTube channel video in website</title>
		<link>https://www.codypaste.com/youtube-channel-video-in-website/</link>
					<comments>https://www.codypaste.com/youtube-channel-video-in-website/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Mon, 27 May 2024 06:42:11 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1134</guid>

					<description><![CDATA[<p>How to load/list YouTube channel Videos? Here we will see how we can load YouTube channel video in our website by using JSON. There are two steps: Query Channels to get the &#8220;uploads&#8221; Id. eg [crayon-6985bb8ec7233839805244/] Use this &#8220;uploads&#8221; Id to query PlaylistItems to get the list of videos. eg [crayon-6985bb8ec7242618118120/] Now we will start &#8230; </p>
<p class="link-more"><a href="https://www.codypaste.com/youtube-channel-video-in-website/" class="more-link">read more<span class="screen-reader-text"> "YouTube channel video in website"</span></a></p>
<p>The post <a href="https://www.codypaste.com/youtube-channel-video-in-website/">YouTube channel video in website</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1>How to load/list YouTube channel Videos?</h1>
<p>Here we will see how we can load YouTube channel video in our website by using JSON.</p>
<p>There are two steps:</p>
<p>Query Channels to get the &#8220;uploads&#8221; Id. eg</p><pre class="urvanov-syntax-highlighter-plain-tag">https://www.googleapis.com/youtube/v3/channels?id={channel Id}&amp;key={API key}&amp;part=contentDetails</pre><p>Use this &#8220;uploads&#8221; Id to query PlaylistItems to get the list of videos. eg</p><pre class="urvanov-syntax-highlighter-plain-tag">https://www.googleapis.com/youtube/v3/playlistItems?playlistId={"uploads" Id}&amp;key={API key}&amp;part=snippet&amp;maxResults=50</pre><p></p>
<h2><strong><span style="font-size: 24pt;">Now we will start this from scratch</span></strong></h2>
<p><span style="font-size: 18pt;"><strong>STEP 1 (Get API Key):</strong></span><br />
We will get &#8216;API Key&#8217; from Google Developer Console, you can find steps here : <a href="https://developers.google.com/youtube/v3/getting-started" target="_blank" rel="noopener">https://developers.google.com/youtube/v3/getting-started</a></p>
<p><span style="font-size: 18pt;"><strong>STEP 2 (Get Channel ID):</strong></span><br />
Go to your YouTube Channel and copy your channel URL e.g. <em>https://www.youtube.com/channel/XXXXXXXThs2cnXXX-dt</em><br />
and your channel id is &#8216;<strong>XXXXXXXThs2cnXXX-dt</strong>&#8216;.</p>
<p><strong><span style="font-size: 18pt;">STEP 3 :</span></strong><br />
Now replace {channel Id} with your channel id and API Key with your API Key<br />
<em>https://www.googleapis.com/youtube/v3/channels?id=<strong>{channel Id}</strong>&amp;key=<strong>{API key}</strong>&amp;part=contentDetails</em><br />
to<br />
<em>https://www.googleapis.com/youtube/v3/channels?id=<strong>XXXXXXXThs2cnXXX-dt</strong>&amp;key=XXXXXXXXXXXXXXXXXXX&amp;part=contentDetails</em></p>
<p>Here you will get &#8220;uploads&#8221; Id to query Playlist Items e.g.</p><pre class="urvanov-syntax-highlighter-plain-tag">{
  "kind": "youtube#channelListResponse",
  "etag": "XXXXXXXXXXXABiQXX",
  "pageInfo": {
    "totalResults": 1,
    "resultsPerPage": 5
  },
  "items": [
    {
      "kind": "youtube#channel",
      "etag": "XXXXXXXXXXYmaRUXXXXXX",
      "id": "XXXXXhs2cnzpqc-rAXXX",
      "contentDetails": {
        "relatedPlaylists": {
          "likes": "",
          "uploads": "XXXXwEk6hThs2cnzXXXX" // this is upload id
        }
      }
    }
  ]
}</pre><p><em><strong>&#8220;uploads&#8221;: &#8220;XXXXwEk6hThs2cnzXXXX&#8221;</strong> </em>is the upload id</p>
<p><span style="font-size: 18pt;"><strong>STEP 4 :</strong></span><br />
Use this &#8220;uploads&#8221; Id to query PlaylistItems to get the list of videos. eg</p><pre class="urvanov-syntax-highlighter-plain-tag">https://www.googleapis.com/youtube/v3/playlistItems?playlistId={"uploads" Id}&amp;key={API key}&amp;part=snippet&amp;maxResults=50</pre><p>&nbsp;</p>
<p>Here you will get Palaylist in json Format.</p>
<p>The post <a href="https://www.codypaste.com/youtube-channel-video-in-website/">YouTube channel video in website</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/youtube-channel-video-in-website/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Instagram Feed on Website PHP</title>
		<link>https://www.codypaste.com/instagram-feed-on-website-php/</link>
					<comments>https://www.codypaste.com/instagram-feed-on-website-php/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Fri, 24 May 2024 12:02:49 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1130</guid>

					<description><![CDATA[<p>Instagram Feed in  PHP STE 1 : Get Instagram Access Token https://docs.oceanwp.org/article/487-how-to-get-instagram-access-token STEP 2 : PHP Code for Website [crayon-6985bb8ec7597928804338/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/instagram-feed-on-website-php/">Instagram Feed on Website PHP</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Instagram Feed in  PHP</p>
<h3><strong>STE 1 : Get Instagram Access Token</strong></h3>
<p><a href="https://docs.oceanwp.org/article/487-how-to-get-instagram-access-token" target="_blank" rel="noopener">https://docs.oceanwp.org/article/487-how-to-get-instagram-access-token</a></p>
<h3><strong>STEP 2 : PHP Code for Website</strong></h3>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
$access_token = 'IGQVJWR0VIbHF6cGl0aTZA5NnFsMkxhbHY3MmR0em83emNZAQ3Vxa0dtenRrTHZAqVzFpbHhENmtDRjNIY2lFSGthUkFzX191TEU3SDJzcVJDcnNTYkVYVFlRa1JJZAE12YmFLMVdpWUV4YTJ6cGxWeDBmaQZDZD';

$fields ='id,caption,thumbnail_url,media_url,permalink';

  function fetchData($url){
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_TIMEOUT, 20);
  $result = curl_exec($ch);
  curl_close($ch); 
  return $result;
  }

  $result = fetchData("https://graph.instagram.com/me/media?fields=".$fields."&amp;access_token=".$access_token."");


  $result = json_decode($result);
  
  //echo'&lt;pre&gt;';
  //print_r($result); die();
  
  
  foreach ($result-&gt;data as $post) {
      
      $thumbnail_url    = $post-&gt;thumbnail_url;
      $image    = $post-&gt;media_url;
      $url      = $post-&gt;permalink;
      $caption  = $post-&gt;caption; // Text content
     ?&gt;
        &lt;div style="width:20%; float:left; padding:5px; margin:5px; border:solid 1px #ebebeb;"&gt;
            &lt;a href="&lt;?php echo $url; ?&gt;" target="_blank"&gt;
                &lt;?php
                    if($thumbnail_url==""){
                ?&gt;
                    &lt;img src="&lt;?php echo $image; ?&gt;" width="100%"&gt;
                &lt;?php }else{
                    ?&gt;
                    &lt;img src="&lt;?php echo $thumbnail_url; ?&gt;" width="100%"&gt;
                    &lt;?php
                } ?&gt;
                
                
                
                
                
                &lt;p&gt;&lt;?php echo $caption; ?&gt;&lt;/p&gt;
            &lt;/a&gt;
        &lt;/div&gt;
     &lt;?php
  }
?&gt;</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/instagram-feed-on-website-php/">Instagram Feed on Website PHP</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/instagram-feed-on-website-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>File Size Validation jQuery</title>
		<link>https://www.codypaste.com/file-size-validation-jquery/</link>
					<comments>https://www.codypaste.com/file-size-validation-jquery/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 22 May 2024 06:43:41 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1128</guid>

					<description><![CDATA[<p>Multiple selected files size validation before form submit in jQuery. HTML Form [crayon-6985bb8ec7887327582387/] &#160; jQuery Validation [crayon-6985bb8ec7896076880791/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/file-size-validation-jquery/">File Size Validation jQuery</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Multiple selected files size validation before form submit in jQuery.</p>
<p><strong>HTML Form</strong></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;form action="#" method="post" enctype="multipart/form-data"&gt;
	&lt;input type="file" name="invoice[]" id="customFile" required multiple&gt;			
	&lt;label for="customFile"&gt;Choose file&lt;/label&gt;		
	&lt;button class="btn btn-success" type="submit" style="margin-left: 15px;"&gt;Upload&lt;/button&gt;  
&lt;/form&gt;</pre><p>&nbsp;</p>
<p><strong>jQuery Validation</strong></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"&gt;&lt;/script&gt;  
&lt;script&gt;
    $(document).ready(function(){
         $("form").submit(function(){
            //==Check File Size==&gt;
            var splashArray = new Array();
            var files = $('form :input[type=file]').get(0).files;
            for (i = 0; i &lt; files.length; i++)
            {
               splashArray.push(files[i].size);
            }
            //alert(JSON.stringify(splashArray));
            var total = 0;
            for (var i = 0; i &lt; splashArray.length; i++) {
                total += splashArray[i] &lt;&lt; 0;
            }
            //alert(total);
            if (total &gt; 5000000){
                alert('Total File size should not more than 5 MB');
                return false;
            }
        }); 
    });
&lt;/script&gt;</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/file-size-validation-jquery/">File Size Validation jQuery</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/file-size-validation-jquery/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Top Free Bootstrap Themes</title>
		<link>https://www.codypaste.com/top-themes/</link>
					<comments>https://www.codypaste.com/top-themes/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Mon, 05 Feb 2024 06:24:02 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Theme]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1098</guid>

					<description><![CDATA[<p>https://themewagon.com/themes/nomad-force-free-bootstrap-5-html5-landing-page-template/</p>
<p>The post <a href="https://www.codypaste.com/top-themes/">Top Free Bootstrap Themes</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<ol>
<li><a href="https://themewagon.com/themes/nomad-force-free-bootstrap-5-html5-landing-page-template/">https://themewagon.com/themes/nomad-force-free-bootstrap-5-html5-landing-page-template/</a></li>
<li></li>
</ol>
<p>The post <a href="https://www.codypaste.com/top-themes/">Top Free Bootstrap Themes</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/top-themes/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Make Google reCaptcha required and use in JQuery Ajax</title>
		<link>https://www.codypaste.com/google-recaptcha-required-and-use-in-jquery-ajax/</link>
					<comments>https://www.codypaste.com/google-recaptcha-required-and-use-in-jquery-ajax/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Thu, 18 Jan 2024 06:56:50 +0000</pubDate>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[CodeIgniter 4]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1088</guid>

					<description><![CDATA[<p>Add reCaptcha in HTML form [crayon-6985bb8ec7bd1227550261/] &#160; Get reCaptcha Value in jQuery and pass in ajax [crayon-6985bb8ec7be0114000703/] &#160; Validate reCaptcha [crayon-6985bb8ec7be4431889187/] &#160; Make reCaptcha checkbox required [crayon-6985bb8ec7be7075014026/] &#160; Reset reCaptcha For reCaptcha v2, use: [crayon-6985bb8ec7bea941949840/] If you&#8217;re using reCaptcha v1 (probably not): [crayon-6985bb8ec7bed155492425/]</p>
<p>The post <a href="https://www.codypaste.com/google-recaptcha-required-and-use-in-jquery-ajax/">Make Google reCaptcha required and use in JQuery Ajax</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><span style="font-size: 14pt;"><strong>Add reCaptcha in HTML form</strong></span></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;script src='https://www.google.com/recaptcha/api.js'&gt;&lt;/script&gt;
            &lt;div class="g-recaptcha" data-sitekey="YOUR-SITE-KEY"&gt;&lt;/div&gt;</pre><p>&nbsp;</p>
<p><span style="font-size: 14pt;"><strong>Get reCaptcha Value in jQuery and pass in ajax</strong></span></p><pre class="urvanov-syntax-highlighter-plain-tag">var g_recaptcha_response = grecaptcha.getResponse();
var dataString = 'uname='+ uname + '&amp; g-recaptcha-response=' + g_recaptcha_response;</pre><p>&nbsp;</p>
<p><span style="font-size: 14pt;"><strong>Validate reCaptcha</strong></span></p><pre class="urvanov-syntax-highlighter-plain-tag">$secret = 'YOUR-SECRET-KEY'; //google captcha check
//get verify response data
$verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&amp;response='.$_POST['g-recaptcha-response']);
$responseData = json_decode($verifyResponse);
if($responseData-&gt;success){
   //Do if captcha is valid
}</pre><p>&nbsp;</p>
<p><span style="font-size: 14pt;"><strong>Make reCaptcha checkbox required</strong></span></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;!-- GCaptcha require karne ke liye--&gt;
    &lt;style&gt;
        #g-recaptcha-response {
          display: block !important;
          position: absolute;
          margin: -78px 0 0 0 !important;
          width: 302px !important;
          height: 76px !important;
          z-index: -999999;
          opacity: 0;
        }
    &lt;/style&gt;
    &lt;script&gt;
        window.addEventListener('load', () =&gt; {
      const $recaptcha = document.querySelector('#g-recaptcha-response');
      if ($recaptcha) {
        $recaptcha.setAttribute('required', 'required');
      }
    })
    &lt;/script&gt;
&lt;!-- --&gt;</pre><p>&nbsp;</p>
<p><strong><span style="font-size: 14pt;">Reset reCaptcha</span></strong></p>
<p>For reCaptcha v2, use:</p><pre class="urvanov-syntax-highlighter-plain-tag">grecaptcha.&lt;span class=&quot;hljs-title function_&quot;&gt;reset&lt;/span&gt;();</pre><p>If you&#8217;re using reCaptcha v1 (<strong>probably not</strong>):</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;span class=&quot;hljs-title class_&quot;&gt;Recaptcha&lt;/span&gt;.&lt;span class=&quot;hljs-title function_&quot;&gt;reload&lt;/span&gt;();</pre><p></p>
<p>The post <a href="https://www.codypaste.com/google-recaptcha-required-and-use-in-jquery-ajax/">Make Google reCaptcha required and use in JQuery Ajax</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/google-recaptcha-required-and-use-in-jquery-ajax/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>DOM Pdf Page Break Issue</title>
		<link>https://www.codypaste.com/dom-pdf-page-break-issue/</link>
					<comments>https://www.codypaste.com/dom-pdf-page-break-issue/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Thu, 26 Oct 2023 10:59:57 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=1080</guid>

					<description><![CDATA[<p>In Short: You cant make table under any table. page break issue will resolve &#160;</p>
<p>The post <a href="https://www.codypaste.com/dom-pdf-page-break-issue/">DOM Pdf Page Break Issue</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In Short:</p>
<p>You cant make table under any table. page break issue will resolve</p>
<p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/dom-pdf-page-break-issue/">DOM Pdf Page Break Issue</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/dom-pdf-page-break-issue/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
