|
Posted by Jerry Stuckle on 01/20/08 13:50
Paul Lautman wrote:
> I need to get some data from a MSSQL database via an asp server, to display
> in a php generated page. I don't want to pre-format the data from a display
> pov, as that means going to the asp server whenever I want to change it.
>
> This data will be a few information fields (e.g. total_number_of_rows_found,
> number_of_rows_per_page, current_page_number) plus the columns/rows actually
> returned by the query (I guess I really only need to know
> total_number_of_rows_found as I will be supplying the other information as
> input parms, but this gives the general idea).
>
> I am pleasantly in the exact opposite situation as normally found here, in
> that I can control the sending asp script as well as the receiving php one
> (although, whilst I may not be anywhere near an expert php programmer, my
> php/MySQL skills far outweigh my asp/MSSQL ones!).
>
> An obvious choice of communications protocol is xml, but does anyone have
> any other ideas of neat ways to package up the data at the asp end, to make
> it easy to access over on the php side?
>
>
>
Paul,
I've found xml is about the best for things like this.
I implemented something similar for a non-profit a while back. Their
local chapters needed access to a subset of the database, but they
didn't want to make the database accessible via the internet. So I just
built some xml2 pages for them to fetch and supplied some cURL code for
them to get what they wanted. The DOM functions in PHP allowed them to
parse the data as they wished.
The only real problem was building "well-formed" xml. I didn't find any
good tools for VBScript for building the xml, but it wasn't all that hard.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|