Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-30-2006, 01:24 AM   #1
pkny
Registered User
 
Join Date: Jul 2001
Posts: 72
Default sending xml via php - GOOD, but cant receive php response..

hi i'm having a bit of trouble.. this thing is due tmr and i need help.. first off - the xml i'm sending via flash is be received by the php.. i was able to create a file etc. but i can't seem to capture the stuff sent back from the php..

here's my php code:

$filename = "xmloutput.txt";
$fp = fopen( $filename,"w+");
fwrite ( $fp, "$HTTP_RAW_POST_DATA" );
fclose( $fp );

print '<?xml version="1.0"?><result>LOGIN OK</result>';


here a part of the code i used in my flash for my button:

announcementXML.contentType = "text/xml";

sentXML = new XML();
sentXML.onLoad = myOnLoad;

announcementXML.sendAndLoad("http://ted.ifrim.ca/scgi-bin/XML_ParseToDB.php", sentXML);

title = content = "";

trace(sentXML.toString());


again i would like to reiterate - that the text file is created by the php but i can't seem to capture the "print" from the php

any help is much appreciated..
pkny is offline   Reply With Quote
Old 03-30-2006, 01:37 AM   #2
irf2k
Senior Member
 
Join Date: Mar 2006
Posts: 152
Default

hey, i'm no expert when it comes to AS, but i've actually done what you're trying to do, and instead of loading the file directly using sendAndLoad my code looks like this:
Code:
loadVariablesNum('test2.php', 0, 'POST');

//after checking that this has loaded
myXML = new XML(xmlinfo);
and in my php:
Code:
print "xmlinfo=(whatever xml you want, ensuring that you urlencode it so that the &'s do not interfere with variable definition)"
tho, since this is for an assignment, i'm not sure if you're allowed to do it like this...but my code executes perfectly for me
irf2k is offline   Reply With Quote
Old 03-30-2006, 01:41 AM   #3
pkny
Registered User
 
Join Date: Jul 2001
Posts: 72
Default

hmm.. i'll try that out but the thing is that the code i got for the php was from a tutorial

thanks for your help
pkny is offline   Reply With Quote
Old 03-30-2006, 01:51 AM   #4
pkny
Registered User
 
Join Date: Jul 2001
Posts: 72
Default

apparently the tutorial i was following fell short of a function that checks if the xml sent from the php was sent

ha.

ok back to work
pkny is offline   Reply With Quote
Old 03-30-2006, 01:51 AM   #5
pkny
Registered User
 
Join Date: Jul 2001
Posts: 72
Default

apparently the tutorial i was following fell short of a function that checks if the xml sent from the php was sent

ha.

ok back to work
pkny is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Good Hosting Solution For PHP Uploads? ian27 Server-Side Scripting 2 03-16-2006 02:09 AM
Sending variables to PHP acornFlyer Server-Side Scripting 3 08-04-2005 12:47 PM
Sending to PHP script from flashmx flashnoobie ActionScript 1.0 (and below) 3 03-15-2005 10:54 PM
sending variables from flash to php script? Nomadgita ActionScript 1.0 (and below) 2 12-13-2004 02:49 AM
Does someone know about a good free host w/ PHP support? atomskreymx General Chat 52 12-01-2004 07:27 AM


All times are GMT. The time now is 06:43 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.