Skip to main content

Posts

GET request to the above URL and return the result we would use:

// Get cURL resource $curl = curl_init(); // Set some options - we are passing in a useragent too here curl_setopt_array( $curl , array ( CURLOPT_RETURNTRANSFER => 1 , CURLOPT_URL => 'http://url.com/?item1=value&item2=value2' , CURLOPT_USERAGENT => )); // Send the request & save response to $resp $resp = curl_exec( $curl ); // Close request to clear up some resources curl_close( $curl );

How to force HTTPS using .htaccess file in cPanel

Create .htaccess file on root and type below code METHOD 1: RewriteCond %{HTTPS} !=on # This checks to make sure the connection is not already HTTPS RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]          METHOD 2:        RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]   Save and Upload .