Using Authentication Header with file_get_contents in PHP
In PHP, file_get_contents() function is commonly used to get content of a file or a url and it works like a charm in normal scenario. If in case, the URL or file endpoint is under htaccess authentication, issue arises. Learn How to Password Protect…
Remove index.php from Codeigniter using htaccess
In CodeIgniter project the index.php file will be included in your URLs by default. However, we would want to remove index.php from our URL to make it look clean as well as make it SEO friendly. We can achieve this with following 2 simple steps : Step 1:…
Password Protect Website using .htaccess file
htaccess password protection can be very useful sometimes when we want only authorized users to access a certain webpage. This can be achieved easily by creating two files : .htaccess .htpassword You can create the username password file from this link :…
How to execute PHP code from HTML File ???
The following post shows a cool way to execute PHP code from files with HTML extension with the help of .htaccess file. We can write PHP code in a file with HTML extension and run that HTML file on server side thus executing the PHP code written on it.…