How is it possible to rewrite website on the fly.
For example, when i use exeoutput as browser and browse other website, i would like to rewrite the source of this website by php script before display it.
I need it for something like cms for website i did. When anybode browse this website by regular browser chrome, firefox, opera it looks as it should look for enduser, but when owner of website browse by exeoutput application i need to rewrite it that he could edit and manage his website. How can i do it?
You should use a PHP script to download the HTML code from the website, modify the content you want and return it. Something like:
$ret = download(…)
// modify $ret
is it only option? is it possible to you to enable option like this?
parse on the fly
css inject, js inject on the fly
regex string replace
in your answer if i use exeoutput as browser and browse another website, how can I catch url and use exeoutput it to render downloaded website, how to use it with cookies etc?
You won’t be able to modify browsed content, this would require a content filter and this is not available through PHP.
have you got any advice how to achieve it?
I had thought about this method some time back and found http://getcontenttools.com/
Not even sure feasible and is still on my whiteboard under things to explore / try. When I read through their docs got impression it might work with API but never took it any further:)
Old Teacher thank you for your link, this soft is very nice, but my question was about something else.
I need to use something like ambasador pattern. You and gdgsoft could start to explore about this pattern here https://firstname.lastname@example.org/using-the-ambassador-pattern-for-reliable-pipes-and-filters-text-processing-9ebbea8f82c4
I am asking developers for positive consideration of my request for the addition of real-time filtering and substitution of the html source. Please please please.
Found something interesting which can help you understand what i need
My bad, was on my phone and missed your point on the small screen:)