It is impossible to protect the source code of your website. Anyone can view the source code of your website by clicking on the option ‘View Source Code’ or by pressing ‘Ctrl + U’ in the web browser. However, it is possible to protect the functions and programming code of your website by encrypting the PHP files. You can make use of ‘Zend’ and ‘loncube’ for encrypting the PHP files. But the truth is that the source code of your website is displayed on the website itself and anyone can view it.