Quote:
Originally Posted by pipeit
There is a bug in phproxy. I corrected it on our proxy, and I'll see if I can find the fix for you.
The url form at the top of the surf pages is not visible on all pages, because they render the proxified html wrong.
Let me know if you are interested in the fix!
Another way to monetize it a little bit more is to show banners and popunders when people surf the pages.
|
I think this is how to fix the script:
Edit the file: PHProxy.class.php
Replace
PHP Code:
preg_match_all('#(<\s*style[^>]*>)(.*?)(<\s*/style[^>]*>)#is', $this->response_body, $matches, PREG_SET_ORDER);
with
PHP Code:
preg_match_all('#(<\s*style[^>]*>)(.*?)(<\s*/style[^>]*>)#is', $this->response_body, $matches, PREG_SET_ORDER);
and replace
PHP Code:
if (!isset($tags[$tag]) || !preg_match_all("#([a-zA-Z\-\/]+)\s*(?:=\s*(?:\"([^\">]*)\"?|'([^'>]*)'?|([^'\"\s]*)))?#", $matches[2][$i], $m, PREG_SET_ORDER))
with this:
PHP Code:
if ( $tag != "body" &&(!isset($tags[$tag]) || !preg_match_all("#([a-zA-Z\-\/]+)\s*(?:=\s*(?:\"([^\">]*)\"?|'([^'>]*)'?|([^'\"\s]*)))?#", $matches[2][$i], $m, PREG_SET_ORDER)))
I don't really remember all the details about the fix. But I think the problem was that the body-tag not always was recognized correctly.
Try the fix and surf a page that previously removed the url form and see if it's visible now.
__________________
Please login or register to view this content. Registration is FREE and many other sites...
|