473,811 Members | 3,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2364
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.c h> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.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::lo adXML(ob_get_co ntents());
$xp->importStyleShe et(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
6331
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. Users typing hostname/phpstuff don't get anything because there is no index.htm there, only index.php. What can I put in an index.htm file that'll invoke the index.php file? Or is there a setting in the Apache 2.0 server I've overlooked? ...
1
2432
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 PHP) and MySQL. Some ideas ? (please by email too) Thank you very much. Lawrence
4
2397
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 c:/php-4.2.3-Win32/sapi/php4apache2.dll (in httpd.conf), then the Apache Server refuces to start (I get "The requested operation has failed" msg).
4
7409
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 about me installing Tomcat. Can I run PHP from Tomcat the same (or close to) as IIS? Thanks. --
4
1680
by: jperson | last post by:
Can ASP run on Apache. If yes, how do you configure them to each other?
1
2487
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 narrowed down the Apache Client Cert failures to my PHP/PGSQL build. 1. Apache PHP without PGSQL works as expected using client certificates 2. Apache PHP with PGSQL works fine with standard SSL connections 3 Apache PHP with PGSQL fails with...
3
2017
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 google API requires the following line in the output HTML: <script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg" type="text/javascript"> The problem is that I can't get the '&' to properly make it into the result. I can get &amp;. ...
1
3335
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 http://www.activestate.com/. Then I went to http://www.modpython.org/ and search how to use python script with my web pages. I've tried all the version of mod_python under 2.7.11. As I'm under Windows XP, I can only install
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10384
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10395
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9204
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6887
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4338
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.