473,382 Members | 1,165 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,382 software developers and data experts.

XML driven php apache site

Hi,

I'm experimenting with a php based parser that displays each page from
separate XML data files. Ideally, the site will be defined by xml
pages instead of php or html pages, all parsed and displayed by the
same piece of php code.

How can I implement this so that when a user clicks on a link (to an
xml document), the cetrally located templated parses it and displays
the new page, maintaining the site directory structure and being
search engine friendly.

Thanks
Jul 17 '05 #1
3 1618
How are you displaying these XML documents? As XML, or converted into HTML?

--
Tony Marston

http://www.tonymarston.net
"Gooseman" <da***@danworld.com> wrote in message
news:f9**************************@posting.google.c om...
Hi,

I'm experimenting with a php based parser that displays each page from
separate XML data files. Ideally, the site will be defined by xml
pages instead of php or html pages, all parsed and displayed by the
same piece of php code.

How can I implement this so that when a user clicks on a link (to an
xml document), the cetrally located templated parses it and displays
the new page, maintaining the site directory structure and being
search engine friendly.

Thanks

Jul 17 '05 #2
Gooseman wrote:
Hi,

I'm experimenting with a php based parser that displays each page from
separate XML data files. Ideally, the site will be defined by xml
pages instead of php or html pages, all parsed and displayed by the
same piece of php code.

How can I implement this so that when a user clicks on a link (to an
xml document), the cetrally located templated parses it and displays
the new page, maintaining the site directory structure and being
search engine friendly.

Thanks


Have a read of the mod_mime directives for Apache. You should specifically
have a look at the SetHandler and Action directives. You can place these in
<Directory> or <Location> blocks (or even globally).

Using these directives, you can force all requests to a particular PHP
script, and then use the REQUEST_URI to determine which XML file the PHP
script should parse.
Nathan
Jul 17 '05 #3
Hi,
How can I implement this so that when a user clicks on a link (to an
xml document), the cetrally located templated parses it and displays
the new page, maintaining the site directory structure and being
search engine friendly.


For Apache 1.3x:

AddType application/x-xml-parse .xml
Action application/x-xml-parse "/link/to/xml/parser/xml.php?file="

Put this two lines either in a .htaccess file or into a Directory
context block in httpd.conf. If a .xml is requested by the browser, the
web server calls xml.php and sets the requested filename as the ?file=
parameter. That should do it.

Wolfgang Ulmer
Jul 17 '05 #4

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

Similar topics

9
by: j askey | last post by:
I have a strange bandwidth issue that I have finally tracked down to something fairly specific if anyone has any ideas... Setup: Win2003 Server, PHP 4.3.4, IIS6.0, ISAPI Network: DSL line with...
1
by: New to PHP | last post by:
I am able to install Apache in my XP home edition. I did put a very simple index.html /apache/htdocs/index.html and when I type in http://localhost/index.html, I get this error : Not Found. ...
2
by: HR | last post by:
I'm called upon to redo a website for a client that will have (when it's built the way they want) the ability to serve up information dynamically. I can build up the front end with the graphics...
6
by: P Jones | last post by:
Hi, I support an enterprise web application (IE client) built in VB6, with about 200 classes, serving about 7000 users, running on 3 clustered servers. I need to incorporate web reporting for...
1
by: Csaba Gabor | last post by:
Maybe someone has an idea about this... I have two PHP scripts and they would like to efficiently communicate (on a a callback or event driven basis) with each other. If these are CLI versions of...
6
by: MaiyaHolliday | last post by:
Hello, I've recently installed apache on a new computer, and cannot figure out why my site will not process any includes. (it was working on my old one) There are no errors on the page such as...
7
by: Joe | last post by:
I added some ajax to my asp.net web site and will Ajax just doesn't seem to work. Does Any one PLEASE have any ideas on why Ajax doesn't work on Apache 2.2.6 w/asp.net 2.0
25
by: pereges | last post by:
Hello, I'm trying to build a database driven website for a library management system. The database is stored on a remote server which all of my team mates can access. I've installed MySQL, PHP and...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.