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:
AutoCommit Preference? (1998)
WebCat2 - [format thousands] (1997)
Bug with sendmail under RedHat (2006)
WebCat b13 CGI -shownext- (1997)
WebCatalog Upgrade Pricing? (1997)
Unexceling (was I need a smart quote...) (1999)
Uh...can someone help me out with the b10? (1997)
Giving out error pages (1997)
Big Databases (1997)
WebCat2.0 acgi vs plugin (1997)
quick [middle] Q (2000)
Web Catalog 2 demo (1997)
WebDNA dying or ... ? (2005)
Setting up the server (1997)
WebCat2: Items xx to xx shown, etc. (1997)
Fwd: [WebDNA] Froala Editor working with WebDNA (2016)
[WebDNA] Database Column Update (2015)
Using Applescript to process WebCatalog functions (1998)
SSL do I need it?? (1998)
New WebCatalog Version !!! (1997)