473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

HTTP filtering with PHP & Apache ?

Hello

I am looking for a full example how I can achieve an http output
filtering with php on an apache 2 server. I found some hints that the
apache server supports to isntall and conifugrate such filters
http://httpd.apache.org/docs/2.0/mod...ddoutputfilter
But I didn't found an example which is related to PHP.

I like to achieve for my shop using a template mechanism based on xml &
xsl with PHP. My idea is currently to use an output filter which does
the xsl transformation.
If anybody knows a tutorial or even some applicable frameworks in this
area please post me here the links.

Many thanks

regards
Mark Egloff

Sep 25 '05 #1
3 2353
I don't think what you have in mind is possible. The PHP Apache 2
filter executes code embedded in the output stream (with limitation).
It wasn't designed to let a script filter the output stream. You can
get around that through the use of an auto-prepend script and output
buffering. But why use a hack when there're more orthodox way of doing
things?

Sep 25 '05 #2
If you want to generate HTML output from XSL transformations using XML data
created from a PHP script then take a look at
http://www.tonymarston.net/php-mysql...plication.html

--
Tony Marston
http://www.tonymarston.net

"joes" <jo**@bluewin.ch> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hello

I am looking for a full example how I can achieve an http output
filtering with php on an apache 2 server. I found some hints that the
apache server supports to isntall and conifugrate such filters
http://httpd.apache.org/docs/2.0/mod...ddoutputfilter
But I didn't found an example which is related to PHP.

I like to achieve for my shop using a template mechanism based on xml &
xsl with PHP. My idea is currently to use an output filter which does
the xsl transformation.
If anybody knows a tutorial or even some applicable frameworks in this
area please post me here the links.

Many thanks

regards
Mark Egloff

Sep 26 '05 #3
Thanks all for your input.... I found more or less what I have looked
for. Rather than using an output filter I am using the call back
functions for the output buffer handling.

This simplifies the content rendering too, Also I hoped I could achieve
it with 0 inlcudes...)

http://www.contentwithstyle.co.uk/Articles/44/

or the xslt usage for php5

function parseOutput()
{

// php5
$xp = new XsltProcessor();
$doc = DOMDocument::loadXML(ob_get_contents());
$xp->importStyleSheet(DOMDocument::loadXML($this->getExampleXSL()));
return $xp->transformToXML($doc);

}

regards
Mark Egloff

Oct 11 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Lab309 | last post by:
The problem I'm trying to solve is as follows: The website has two subdirectories: /ordinary and /phpstuff. Users typing hostname/ordinary get the file index.htm by default, and this works fine. ...
1
by: Harry Koh | last post by:
I would like to benchmark some scripts by - measuring the time a page loads - counting the number of connections to MySQL by page - ... So that, i'm looking for a software beside Apache (for...
4
by: Panos Hadjikomninos | last post by:
Hello, can anyone help me, I am new to PHP. I am trying to set up the Apache Server for PHP (in Windows XP), but when I ad the line: LoadModule php4_module...
4
by: SamMan | last post by:
We are getting new computers at work and I got the word today that pc-lan (network admins) do not want IIS installed on ANY machine. We are primarily a Java development house, so they will not balk...
4
by: jperson | last post by:
Can ASP run on Apache. If yes, how do you configure them to each other?
1
by: sysxperts | last post by:
Hello, Having an issue that is specific to PHP compiled with PGSQL support with versions noted in subject line. I understand that there are many variables to consider here but believe I have...
3
by: crc128 | last post by:
Hi, I'm looking at using XML and XSLT with apache cocoon to automatically generate html files for a site. the problem I'm having is that I want one of the pages to display a google map, but the...
1
by: Tama | last post by:
Hello, I've didn't find any answer to my problem so I start a new topic. I have installed Apache 1.3.33 on Windows XP. I've also downloaded and installed ActivePython form...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.