<?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>Random Code Snippets for website - Cody Paste</title>
	<atom:link href="https://www.codypaste.com/category/html-2/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codypaste.com/category/html-2/tutorial/</link>
	<description>THE WEB PLAYGROUND</description>
	<lastBuildDate>Mon, 27 May 2024 07:36:08 +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>Random Code Snippets for website - Cody Paste</title>
	<link>https://www.codypaste.com/category/html-2/tutorial/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<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-69abb0e966eac292005040/] Use this &#8220;uploads&#8221; Id to query PlaylistItems to get the list of videos. eg [crayon-69abb0e966ebd288290347/] 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-69abb0e967dd7602174948/] &#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-69abb0e968d73950203039/] &#160; jQuery Validation [crayon-69abb0e968d83285948757/] &#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>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-69abb0e96a13b266753518/] &#160; Get reCaptcha Value in jQuery and pass in ajax [crayon-69abb0e96a14c272629369/] &#160; Validate reCaptcha [crayon-69abb0e96a14f224708424/] &#160; Make reCaptcha checkbox required [crayon-69abb0e96a152537716149/] &#160; Reset reCaptcha For reCaptcha v2, use: [crayon-69abb0e96a155758022861/] If you&#8217;re using reCaptcha v1 (probably not): [crayon-69abb0e96a157248388157/]</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>Save Data to Excel/CSV Instead of MySQL</title>
		<link>https://www.codypaste.com/save-data-to-excel/</link>
					<comments>https://www.codypaste.com/save-data-to-excel/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Thu, 05 Jan 2023 08:03:02 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[csv in php]]></category>
		<category><![CDATA[save data to csv]]></category>
		<category><![CDATA[save php data to csv]]></category>
		<guid isPermaLink="false">https://www.codypaste.com/?p=859</guid>

					<description><![CDATA[<p>If you want to save &#8216;Form&#8217; data or any other data to &#8216;Excel/CSV&#8217;, you are on the right blog. Here we will save Form Data to a &#8216;CSV&#8217; File instead of any Database, we are going to use PHP for this. (We are assuming you have knowledge of PHP) So let&#8217;s get started. &#160; STEP &#8230; </p>
<p class="link-more"><a href="https://www.codypaste.com/save-data-to-excel/" class="more-link">read more<span class="screen-reader-text"> "Save Data to Excel/CSV Instead of MySQL"</span></a></p>
<p>The post <a href="https://www.codypaste.com/save-data-to-excel/">Save Data to Excel/CSV Instead of MySQL</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you want to save &#8216;Form&#8217; data or any other data to &#8216;Excel/CSV&#8217;, you are on the right blog.</p>
<p>Here we will save Form Data to a &#8216;CSV&#8217; File instead of any Database, we are going to use PHP for this.</p>
<p>(We are assuming you have knowledge of PHP)</p>
<p>So let&#8217;s get started.</p>
<p>&nbsp;</p>
<h4>STEP 1:</h4>
<p>Create a CSV File &#8216;<strong>contact_data.csv</strong>&#8216;. (Open Ms Excel and save a file in CSV Format)</p>
<p>Write the column name in the first row of the &#8216;contact_data.csv&#8217;.</p>
<p>(Here we are writing &#8220;sr_no&#8221;,&#8221;name&#8221;,&#8221;email&#8221;,&#8221;subject&#8221;,&#8221;message&#8221; )</p>
<p>&nbsp;</p>
<h4>STEP 2:</h4>
<p>Create a simple HTML Form <strong>index.html</strong> with action &#8216;post.php&#8217;, Code given below</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;form action="post.php" method="post"&gt;
   &lt;h3 align="center"&gt;Contact Form&lt;/h3&gt;
   &lt;br /&gt;     
   &lt;div class="form-group"&gt;
      &lt;label&gt;Enter Name&lt;/label&gt;
      &lt;input type="text" name="name" placeholder="Enter Name" class="form-control" value="" /&gt;
   &lt;/div&gt;
   &lt;div class="form-group"&gt;
      &lt;label&gt;Enter Email&lt;/label&gt;
      &lt;input type="text" name="email" class="form-control" placeholder="Enter Email" value="" /&gt;
   &lt;/div&gt;
   &lt;div class="form-group"&gt;
      &lt;label&gt;Enter Subject&lt;/label&gt;
      &lt;input type="text" name="subject" class="form-control" placeholder="Enter Subject" value="" /&gt;
   &lt;/div&gt;
   &lt;div class="form-group"&gt;
      &lt;label&gt;Enter Message&lt;/label&gt;
      &lt;textarea name="message" class="form-control" placeholder="Enter Message"&gt;&lt;/textarea&gt;
   &lt;/div&gt;
   &lt;div class="form-group" align="center"&gt;
      &lt;input type="submit" name="submit" class="btn btn-info" value="Submit" /&gt;
   &lt;/div&gt;
&lt;/form&gt;</pre><p>&nbsp;</p>
<h4>STEP 3:</h4>
<p>Create <strong>Action</strong> File &#8216;<strong>post.php</strong>&#8216;, Code given below.</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
$error = "";
$name = "";
$email = "";
$subject = "";
$message = "";

function clean_text($string)
{
    $string = trim($string);
    $string = stripslashes($string);
    $string = htmlspecialchars($string);
    return $string;
}

if (isset($_POST["submit"])) {
    if (empty($_POST["name"])) {
        $error .=
            '&lt;p&gt;&lt;label class="text-danger"&gt;Please Enter your Name&lt;/label&gt;&lt;/p&gt;';
    } else {
        $name = clean_text($_POST["name"]);
        if (!preg_match("/^[a-zA-Z ]*$/", $name)) {
            $error .=
                '&lt;p&gt;&lt;label class="text-danger"&gt;Only letters and white space allowed&lt;/label&gt;&lt;/p&gt;';
        }
    }
    if (empty($_POST["email"])) {
        $error .=
            '&lt;p&gt;&lt;label class="text-danger"&gt;Please Enter your Email&lt;/label&gt;&lt;/p&gt;';
    } else {
        $email = clean_text($_POST["email"]);
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
            $error .=
                '&lt;p&gt;&lt;label class="text-danger"&gt;Invalid email format&lt;/label&gt;&lt;/p&gt;';
        }
    }
    if (empty($_POST["subject"])) {
        $error .=
            '&lt;p&gt;&lt;label class="text-danger"&gt;Subject is required&lt;/label&gt;&lt;/p&gt;';
    } else {
        $subject = clean_text($_POST["subject"]);
    }
    if (empty($_POST["message"])) {
        $error .=
            '&lt;p&gt;&lt;label class="text-danger"&gt;Message is required&lt;/label&gt;&lt;/p&gt;';
    } else {
        $message = clean_text($_POST["message"]);
    }

    if ($error == "") {
        $file_open = fopen("contact_data.csv", "a");
        $no_rows = count(file("contact_data.csv"));
        if ($no_rows &gt; 1) {
            $no_rows = $no_rows - 1 + 1;
        }
        $form_data = [
            "sr_no" =&gt; $no_rows,
            "name" =&gt; $name,
            "email" =&gt; $email,
            "subject" =&gt; $subject,
            "message" =&gt; $message,
        ];
        fputcsv($file_open, $form_data);
        $error =
            '&lt;label class="text-success"&gt;Thank you for contacting us&lt;/label&gt;';
        $name = "";
        $email = "";
        $subject = "";
        $message = "";
    }
}

echo $error;
?&gt;</pre><p>&nbsp;</p>
<p><span style="color: #008000;"><a style="color: #008000;" href="https://github.com/vipulrai/Save-to-Excel-CSV" target="_blank" rel="noopener"><strong>DOWNLOAD CODE</strong></a></span></p>
<p>The post <a href="https://www.codypaste.com/save-data-to-excel/">Save Data to Excel/CSV Instead of MySQL</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/save-data-to-excel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Your connection is not private</title>
		<link>https://www.codypaste.com/your-connection-is-not-private/</link>
					<comments>https://www.codypaste.com/your-connection-is-not-private/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 07 Aug 2019 19:37:41 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp]]></category>
		<category><![CDATA[Your connection is not private]]></category>
		<guid isPermaLink="false">http://www.codypaste.com/?p=774</guid>

					<description><![CDATA[<p>WordPress Solutuion &#8211; STEP 1 1. Login WordPress Admin Dashboard. Go to Settings -&#62; General Change : WordPress Address (URL): http://www.codypaste.com to https://www.codypaste.com Site Address (URL): http://www.codypaste.com to https://www.codypaste.com</p>
<p>The post <a href="https://www.codypaste.com/your-connection-is-not-private/">Your connection is not private</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><strong>WordPress Solutuion &#8211; STEP 1</strong></h1>
<ul>
<li>1. Login WordPress <strong>Admin Dashboard.</strong></li>
<li>Go to Settings -&gt; General
<ul>
<li style="list-style-type: none;">
<ul>Change :</p>
<li><span style="font-size: 10pt;">WordPress Address (URL): <span style="color: #ff0000;">http://www.codypaste.com</span> to <span style="color: #008000;">https://www.codypaste.com</span></span></li>
<li><span style="font-size: 10pt;">Site Address (URL): </span><span style="font-size: 10pt;"><span style="color: #ff0000;">http://www.codypaste.com</span> to <span style="color: #008000;">https://www.codypaste.com</span></span></li>
</ul>
</li>
</ul>
</li>
</ul>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-778" src="http://www.codypaste.com/wp-content/uploads/2019/08/wp-ssl-1.jpg" alt="" width="800" height="500" srcset="https://www.codypaste.com/wp-content/uploads/2019/08/wp-ssl-1.jpg 800w, https://www.codypaste.com/wp-content/uploads/2019/08/wp-ssl-1-300x188.jpg 300w, https://www.codypaste.com/wp-content/uploads/2019/08/wp-ssl-1-768x480.jpg 768w" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" /></p>
<p>The post <a href="https://www.codypaste.com/your-connection-is-not-private/">Your connection is not private</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/your-connection-is-not-private/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Auto Permalink value in text field</title>
		<link>https://www.codypaste.com/auto-permalink-value-in-text-field/</link>
					<comments>https://www.codypaste.com/auto-permalink-value-in-text-field/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Fri, 07 Sep 2018 12:00:25 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[auto permalink]]></category>
		<category><![CDATA[auto put filed]]></category>
		<category><![CDATA[permalink]]></category>
		<category><![CDATA[url friendly string]]></category>
		<guid isPermaLink="false">http://www.codypaste.com/?p=692</guid>

					<description><![CDATA[<p>Auto Permalink value from one text field to another in Jquery. This code will convert Text to url friendly and auto put to another text field. [crayon-69abb0e96c872433796115/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/auto-permalink-value-in-text-field/">Auto Permalink value in text field</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Auto Permalink value from one text field to another in Jquery. This code will convert Text to url friendly and auto put to another text field.</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;script  src="https://code.jquery.com/jquery-3.4.1.slim.min.js" &gt;&lt;/script&gt;

&lt;form id="form1" name="form1" method="post"&gt;
&lt;label for="name"&gt;Name:&lt;/label&gt;
&lt;input type="text" name="name" id="name"&gt;
&lt;label for="permalink"&gt;Permalink:&lt;/label&gt;
&lt;input type="text" name="permalink" id="permalink"&gt;
&lt;input type="submit" name="submit" id="submit" value="Submit"&gt;
&lt;/form&gt;

&lt;script&gt;
function slugify(text)
{
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
.replace(/\-\-+/g, '-') // Replace multiple - with single -
.replace(/^-+/, '') // Trim - from start of text
.replace(/-+$/, ''); // Trim - from end of text
}

$("#name").keyup(function(){
var sl_val=this.value;
var sl_val= slugify(sl_val);
$("#permalink").val(sl_val);
});
&lt;/script&gt;</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/auto-permalink-value-in-text-field/">Auto Permalink value in text field</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/auto-permalink-value-in-text-field/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Media queries for common device Breakpoints</title>
		<link>https://www.codypaste.com/media-queries-for-common-device-breakpoints/</link>
					<comments>https://www.codypaste.com/media-queries-for-common-device-breakpoints/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Tue, 17 Jul 2018 08:54:56 +0000</pubDate>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">http://www.codypaste.com/?p=670</guid>

					<description><![CDATA[<p>The @media query is 1/3 of the recipe for responsive design. It is the key ingredient that, in it’s simplest form, allows specified CSS to be applied depending on the device and whether it matches the media query criteria. /* Smartphones (portrait and landscape) ----------- */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) &#8230; </p>
<p class="link-more"><a href="https://www.codypaste.com/media-queries-for-common-device-breakpoints/" class="more-link">read more<span class="screen-reader-text"> "Media queries for common device Breakpoints"</span></a></p>
<p>The post <a href="https://www.codypaste.com/media-queries-for-common-device-breakpoints/">Media queries for common device Breakpoints</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>The @media query is 1/3 of the recipe for responsive design. It is the <strong>key</strong> ingredient that, in it’s simplest form, allows specified CSS to be applied depending on the device and whether it matches the media query criteria.</p>
<p><code class=" language-css"><span class="token comment" spellcheck="true">/* Smartphones (portrait and landscape) ----------- */</span><br />
<span class="token atrule"><span class="token rule">@media</span> only screen and <span class="token punctuation">(</span><span class="token property">min-device-width</span> <span class="token punctuation">:</span> 320px<span class="token punctuation">)</span> and <span class="token punctuation">(</span><span class="token property">max-device-width</span> <span class="token punctuation">:</span> 480px<span class="token punctuation">)</span></span> <span class="token punctuation">{</span><br />
<span class="token comment" spellcheck="true">/* Styles */</span><br />
<span class="token punctuation">}</span></code></p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Smartphones (portrait and landscape) ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 480px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Smartphones (landscape) ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 321px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Smartphones (portrait) ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* iPads (portrait and landscape) ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 768px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1024px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* iPads (landscape) ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 768px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1024px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* iPads (portrait) ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 768px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1024px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/**********
iPad 3
**********/&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 768px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1024px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-min-device-pixel-ratio&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 768px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1024px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-min-device-pixel-ratio&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Desktops and laptops ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen  and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1224px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Large screens ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen  and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1824px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* iPhone 4 ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 480px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-min-device-pixel-ratio&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-width&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 480px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-min-device-pixel-ratio&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* iPhone 5 ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 568px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 568px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* iPhone 6 ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 375px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 667px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 375px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 667px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* iPhone 6+ ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 414px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 736px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 414px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 736px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Samsung Galaxy S3 ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 2&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Samsung Galaxy S4 ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 320px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Samsung Galaxy S5 ----------- */&lt;/span&gt;
&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 360px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; landscape&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; only screen and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-device-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 360px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-device-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;orientation&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; portrait&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; and &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;-webkit-device-pixel-ratio&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 3&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;/* Styles */&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;</pre><p></p>
<p>The post <a href="https://www.codypaste.com/media-queries-for-common-device-breakpoints/">Media queries for common device Breakpoints</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/media-queries-for-common-device-breakpoints/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Twitter Feed API</title>
		<link>https://www.codypaste.com/twitter-feed-api/</link>
					<comments>https://www.codypaste.com/twitter-feed-api/?noamp=mobile#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Mon, 01 May 2017 12:02:04 +0000</pubDate>
				<category><![CDATA[Cool Effect]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[twitter feed api]]></category>
		<guid isPermaLink="false">http://www.codypaste.com/?p=590</guid>

					<description><![CDATA[<p>Go to https://apps.twitter.com/ and create App [crayon-69abb0e96e57e660901266/] &#160;</p>
<p>The post <a href="https://www.codypaste.com/twitter-feed-api/">Twitter Feed API</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Go to <a href="https://apps.twitter.com/" target="_blank">https://apps.twitter.com/</a> and create App</p><pre class="urvanov-syntax-highlighter-plain-tag">&lt;?php
    function buildBaseString($baseURI, $method, $params) {
        $r = array();
        ksort($params);
        foreach($params as $key=&gt;$value){
            $r[] = "$key=" . rawurlencode($value);
        }
        return $method."&amp;" . rawurlencode($baseURI) . '&amp;' . rawurlencode(implode('&amp;', $r));
    }

    function buildAuthorizationHeader($oauth) {
        $r = 'Authorization: OAuth ';
        $values = array();
        foreach($oauth as $key=&gt;$value)
            $values[] = "$key=\"" . rawurlencode($value) . "\"";
        $r .= implode(', ', $values);
        return $r;
    }

    $url = "https://api.twitter.com/1.1/statuses/user_timeline.json";

    $oauth_access_token = "your access token goes here";
    $oauth_access_token_secret = "your access token secret goes here";
    $consumer_key = "your consumer key goes here";
    $consumer_secret = "your consumer secret goes here";

    $oauth = array( 'oauth_consumer_key' =&gt; $consumer_key,
                    'oauth_nonce' =&gt; time(),
                    'oauth_signature_method' =&gt; 'HMAC-SHA1',
                    'oauth_token' =&gt; $oauth_access_token,
                    'oauth_timestamp' =&gt; time(),
                    'oauth_version' =&gt; '1.0');

    $base_info = buildBaseString($url, 'GET', $oauth);
    $composite_key = rawurlencode($consumer_secret) . '&amp;' . rawurlencode($oauth_access_token_secret);
    $oauth_signature = base64_encode(hash_hmac('sha1', $base_info, $composite_key, true));
    $oauth['oauth_signature'] = $oauth_signature;

    // Make requests
    $header = array(buildAuthorizationHeader($oauth), 'Expect:');
    $options = array( CURLOPT_HTTPHEADER =&gt; $header,
                      //CURLOPT_POSTFIELDS =&gt; $postfields,
                      CURLOPT_HEADER =&gt; false,
                      CURLOPT_URL =&gt; $url,
                      CURLOPT_RETURNTRANSFER =&gt; true,
                      CURLOPT_SSL_VERIFYPEER =&gt; false);

    $feed = curl_init();
    curl_setopt_array($feed, $options);
    $json = curl_exec($feed);
    curl_close($feed);

    $twitter_data = json_decode($json);

//print it out
print_r ($twitter_data);

?&gt;

&lt;?php echo $twitter_data[0]-&gt;text; ?&gt;&lt;br /&gt;
Created: &lt;?php echo $twitter_data[0]-&gt;created_at; ?&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;?php echo $twitter_data[1]-&gt;text; ?&gt;&lt;br /&gt;
Created: &lt;?php echo $twitter_data[1]-&gt;created_at; ?&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;?php echo $twitter_data[2]-&gt;text; ?&gt;&lt;br /&gt;
Created: &lt;?php echo $twitter_data[2]-&gt;created_at; ?&gt;
&lt;br /&gt;&lt;br /&gt;</pre><p>&nbsp;</p>
<p>The post <a href="https://www.codypaste.com/twitter-feed-api/">Twitter Feed API</a> appeared first on <a href="https://www.codypaste.com">Cody Paste</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codypaste.com/twitter-feed-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
