My Fellow Php Folks!
I am now doing a peeping Tom into Php-Proxy script to gain work experience in building a web proxy as I am struggling to build one from scratch.
The script has 2 major pp files.
I am including both’s code below.
I need your aid to add comments on the lines so by looking at your comments I can learn what each line does. So, who will be the good Samaritan ?
In the past, the following have helped. Ranked according to who started helping first (according to my memory):
If I’ve forgotten anybody then please excuse.
Let’s not forget the mighty TechnoBear.
Actually, let’s play a little game and make this forum a little fun.
The first person who reads this, make your comments on the first few lines. The 2nd person who reads this can do for the next few lines and so on.
That way, everyone contributes a little.
Ok, the index.php, I believe is the actual script and even though it has comments they are very brief and not so friendly to a newbie. Therefore, any volunteering to make them in depth would be appreciated by all newbies.
Once I finish learning from your comments, then it would be easy for me to complete my other learning project where I try building the web proxy from scratch.
PS – In the index.php, on which line do I add the content filtering code ?
This is where, I will list a list of banned words and if these banned words are found on the page the user is trying to load via the web proxy then the page would not load. I’ll write code for the user to get alerted that the page won’t load because it has banned words in it’s content/title/ meta keywords/meta descriptions/file names/img names/link anchors/etc.
<?php define('PROXY_START', microtime(true)); require("vendor/autoload.php"); use ProxyHttpRequest; use ProxyHttpResponse; use ProxyPluginAbstractPlugin; use ProxyEventFilterEvent; use ProxyConfig; use ProxyProxy; // start...