Re: [WebDNA] how can i grab the contents of a post?
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 106777
interpreted = N
texte = Sorry to be late to the party on this response. A LONG time ago I had to =write an interface to talk to Ariba (a "Spend Management System"*) that =involved sending and receiving xml files via http requests.=20Going thru my code i found we used[text]xmlRequest=3D[::params_string][/text]I don't remember the exact circumstances, but I'm about to be forced to.=20=For the project i'm working on this week I have to integrate to a new =payment processor that insists on using data mangled thru self written =encryption algorithm, and then squirted thru a SOAP interface. ("Just =use our PHP code." "no.")Brian.*If this phrase means nothing or just adds confusion to your brain, you =now understand they value they bring to standing in the middle of =corporate purchasers and vendors.On Jun 13, 2011, at 12:36 PM, Aaron Michael Kaczmarek wrote:> Windows server 2003 / iis 6>=20> On 6/13/11 12:09 PM, Olin Lagon wrote:>> Am running 6 on Linux. What platform are you using to get what you =have? That would make it possible to piece back the XML.>>=20>> Am using an API from The Energy Detective (not published on their =site) which is a real time energy monitor.>>=20>> Aaron Michael Kaczmarek wrote:>>> Could this potentially be a matter of webDNA version? =20>>>=20>>> I'm running 6 and am able to receive xml callbacks to a dna page =just fine; getting xml contents with formvariables. =20>>>=20>>> With formvariables, I get a single variable that is broken at the =first "=3D", so formvars returns this:>>> [name] =3D >> [value] =3D "1.0" encoding=3D"UTF-8"?>......and so on with the rest =of xml>>>=20>>>=20>>> what API are you working with by the way?>>>=20>>> On 6/13/11 11:32 AM, Olin Lagon wrote:>>>> I had already written and tested the XML logic in webdna so to save =time I just wrote the following lines of PHP that grabbed the post =contents, assigned it to a form variable, and redirected it to a webdna =script for processing. The parse.tpl returns XML and this PHP script =sends it back to the requestor with the correct HTTP header.>>>>=20>>>> >>> if ( $_SERVER['REQUEST_METHOD'] =3D=3D=3D 'POST' ){=20>>>> $postText =3D file_get_contents('php://input');=20>>>> }>>>> $content =3D =file_get_contents("http://www.kanuhawaii.org/ted/parse.tpl?thisxml=3D".url=encode($postText));=20>>>> header("Content-type: text/xml");>>>> echo $content;>>>> ?>>>>>=20>>>> This could probably be collapsed to two lines but what I have above =works and it is good enough :)>>>>=20>>>> >>> header("Content-type: text/xml");>>>> echo =file_get_contents("http://yourserver/parse.tpl?thisxml=3D".urlencode(file_=get_contents('php://input')));=20>>>> ?>>>>> =20>>>>=20>>>> Psi Prime Inc, Matthew A Perosi wrote:>>>>> Since I'm completely ignorant when it comes to PHP, what is the =code you used? =20>>>>> Did you grab the incoming content, save it as a file then had =WebDNA trigger occasionally for the written file?>>>>>=20>>>>> Matt
Associated Messages, from the most recent to the oldest:
Sorry to be late to the party on this response. A LONG time ago I had to =write an interface to talk to Ariba (a "Spend Management System"*) that =involved sending and receiving xml files via http requests.=20Going thru my code i found we used
[text]xmlRequest=3D[::params_string][/text]I don't remember the exact circumstances, but I'm about to be forced to.=20=For the project i'm working on this week I have to integrate to a new =payment processor that insists on using data mangled thru self written =encryption algorithm, and then squirted thru a SOAP interface. ("Just =use our PHP code." "no.")Brian.*If this phrase means nothing or just adds confusion to your brain, you =now understand they value they bring to standing in the middle of =corporate purchasers and vendors.On Jun 13, 2011, at 12:36 PM, Aaron Michael Kaczmarek wrote:> Windows server 2003 / iis 6>=20> On 6/13/11 12:09 PM, Olin Lagon wrote:>> Am running 6 on Linux. What platform are you using to get what you =have? That would make it possible to piece back the XML.>>=20>> Am using an API from The Energy Detective (not published on their =site) which is a real time energy monitor.>>=20>> Aaron Michael Kaczmarek wrote:>>> Could this potentially be a matter of webDNA version? =20>>>=20>>> I'm running 6 and am able to receive xml callbacks to a dna page =just fine; getting xml contents with formvariables. =20>>>=20>>> With formvariables, I get a single variable that is broken at the =first "=3D", so formvars returns this:>>> [name] =3D >> [value] =3D "1.0" encoding=3D"UTF-8"?>......and so on with the rest =of xml>>>=20>>>=20>>> what API are you working with by the way?>>>=20>>> On 6/13/11 11:32 AM, Olin Lagon wrote:>>>> I had already written and tested the XML logic in webdna so to save =time I just wrote the following lines of PHP that grabbed the post =contents, assigned it to a form variable, and redirected it to a webdna =script for processing. The parse.tpl returns XML and this PHP script =sends it back to the requestor with the correct HTTP header.>>>>=20>>>> >>> if ( $_SERVER['REQUEST_METHOD'] =3D=3D=3D 'POST' ){=20>>>> $postText =3D file_get_contents('php://input');=20>>>> }>>>> $content =3D =file_get_contents("http://www.kanuhawaii.org/ted/parse.tpl?thisxml=3D".url=encode($postText));=20>>>> header("Content-type: text/xml");>>>> echo $content;>>>> ?>>>>>=20>>>> This could probably be collapsed to two lines but what I have above =works and it is good enough :)>>>>=20>>>> >>> header("Content-type: text/xml");>>>> echo =file_get_contents("http://yourserver/parse.tpl?thisxml=3D".urlencode(file_=get_contents('php://input')));=20>>>> ?>>>>> =20>>>>=20>>>> Psi Prime Inc, Matthew A Perosi wrote:>>>>> Since I'm completely ignorant when it comes to PHP, what is the =code you used? =20>>>>> Did you grab the incoming content, save it as a file then had =WebDNA trigger occasionally for the written file?>>>>>=20>>>>> Matt
"Brian B. Burton"
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
How true is this? (1999)
ListWords passing multi values in one form field (2000)
WebStar Secure on other machine (1997)
Forms Search Questions (1997)
Permissions / Restart WebDNA? (2005)
WebCat constantly restarting (2001)
Emailer (1997)
WebCatalog for Postcards ? (1997)
Feature req. (2002)
2.0 Info (1997)
Deadlock Problem (2000)
WebCat editing, SiteGuard & SiteEdit (1997)
Support ?? (1997)
Fun with Dates - revisited (1997)
Payment Processors (2005)
If Empty ? (1997)
Emailer (1997)
WebCat2b13MacPlugIn - [include] (1997)
WC TableGrinder (1997)
WebSTAR 2.1 freezes my Mac (1997)