Re: Send and Receive XML
| From: | Joe Stump | Date: | Wed, 04 Oct 2000 23:46:53 +0000 |
| Subject: | Re: Send and Receive XML | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-18684@lists.php.net to get a copy of this message | ||
In order to do it real time I would post to your site grab the info, format
the url and use a header() to send them back to the VB site - the VB site can
then format the page and process the variables. Having a port open with some
app that you threw together (not sure about your C skills) just sitting around
screams security risk to me (especially in B2B).
If you MUST do XML then have the VB server turn the user input/data into an
XML "file" in a variable (like $send .=
'<userID>joestump</userID>'."\n") and
then POST that variable to your PHP site - your PHP site will then
explode("\n",$posted_xml_var); run THAT through the xml parsers in PHP, instead
of using while(feof()){ do a while(list($key,$val) = each($array_of_xml)){ and
pass $val as your $data (using my PHP Doc as an example). Your PHP server will
parse it and then either POST back to your VB server (I think you can do this
with a header()) or just do a GET back to your VB server. Either way it's a
sticky situation :O)
--Joe
On Thu, Oct 05, 2000 at 09:42:28AM +1000, Samantha Savvakis wrote:
> hi Joe,
>
> Thanks for replying! I think I've actually read your XML howto :) I really
> like the PHPBuilder site.
>
> Anyway.. I have implemented an XML parser, had no real drama with that.
> I'm just not understanding how the XML data transfer is going to happen
> between two systems. We want to do real-time stuff. The user at the VB PC is
> going to click a button in their program to retrieve data from my server. It
> will have in the XML file, the data that it requires to retrieve. I'm going
> to then receive the XML file, parse it, retrieve the right data and send it
> back to the VB program.
>
> I have written C++ stuff to handle this, having a socket program at a
> particular port and waits for data etc. I just thought that B2B is so much
> more advanced that there has to be a better way. I know SOAP is trying to
> open this up now, but even after reading one book on SOAP I'm still a bit
> confused :)
>
> Thanks again for replying,
> Sam
>
> > -----Original Message-----
> > From: Joe Stump [mailto:joe@earth.care2.com]
> > Sent: Thursday, 5 October 2000 09:31
> > To: Samantha Savvakis
> > Cc: php-general@lists.php.net
> > Subject: Re: [PHP] Send and Receive XML
> >
> >
> > You could read my XML parsing HOWTO on phpbuilder :O)
> >
> > here is the link:
> >
> > http://www.phpbuilder.com/columns/joe20000907.php3
> >
> > If you have any questions you can email me privately - unless others are
> > interested as well.
> >
> > My opinion is that your VB server should do a datadump into XML
> > and your *NIX
> > server should then wget every so often - if you have to have it
> > live have your
> > VB server POST a variable that is in fact XML, explode the
> > variable by "\n"
> > and parse it real time (that would kick ass - haven't done it,
> > but I know it's
> > possible)
> >
> > Just my $0.02!
> >
> > --Joe
> >
> > On Thu, Oct 05, 2000 at 09:23:47AM +1000, Samantha Savvakis wrote:
> > > Hi,
> > >
> > > I'm not really sure if this is the right list to be sending
> > this to, but I
> > > have a few questions about how to send and receive XML files
> > and don't know
> > > where else to write to.
> > >
> > > We are implementing a B2B solution between my company and another and I
> > > would like to do all the data transfer using XML, rather than some
> > > proprietary file format.
> > >
> > > The other company will be using VB on client PC and I'm using
> > PHP and C++ on
> > > a unix web server. How would the PHP receive the XML? Perhaps
> > I'm doing this
> > > all wrong. Maybe I should just be going back to good old TCP sockets and
> > > just send and receive data a particular port.
> > >
> > > I envisiged that somehow the VB application will make a HTTP
> > request to my
> > > PHP page through the web server and somehow with some magic,
> > send me the XML
> > > file. I have heard that to send an file, you place the file in the HTTP
> > > Headers? Is that correct?
> > >
> > > Anyone got any idea of where I can get help on this sort of thing?
> > >
> > > Thanks,
> > > Sam
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > > For additional commands, e-mail: php-general-help@lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> > /*****************************\
> > * Joe Stump *
> > * www.Care2.com *
> > * Office: 650.328.0198 *
> > * Extension: 122 *
> > \*****************************/
> > http://www.miester.org/Joe/Stump/Joe_Stump_resume.html
> >
> > -----BEGIN GEEK CODE BLOCK-----
> > Version: 3.12
> > GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
> > N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
> > 5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
> > ------END GEEK CODE BLOCK------
> >
/*****************************\
* Joe Stump *
* www.Care2.com *
* Office: 650.328.0198 *
* Extension: 122 *
\*****************************/
http://www.miester.org/Joe/Stump/Joe_Stump_resume.html
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GB/E/IT d- s++:++ a? C++++ UL++$ P+ L+++$ E----! W+++$
N+@ o? K? w---! O-@ M+@ V-! P(++) PE(+) Y+@ PGP+++@ t+@
5? R-! tv@ b+ DI++@ D(++++) G++@ e+@ h@ r+! z(+++++**)!
------END GEEK CODE BLOCK------