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:
switching users (1998)
Problem 2: Prefs file... (1997)
[OT] Site launch (2004)
Queertrons? (1997)
url question (2002)
Sorting by highest number of matches unique to a field (2003)
'does not contain' operator needed ... (1997)
webcat and OS 8 (1997)
shipcost (1997)
Loss in Form (1998)
PSC recommends what date format yr 2000??? (1997)
Eudora Plugin (1999)
Purchase Plugin Missing (1996)
RequiredFields template (1997)
Page Counters? (1997)
ACGI processing for .html (1997)
Tcp Connect and the disappearing page (2000)
Displaying photo attached to first record (1997)
Error Lob.db records error message not name (1997)
Code database (1998)