Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / August 2007



Tip: Looking for answers? Try searching our database.

flash to XML via ASP or .net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cramerhwood - 27 Jul 2007 18:29 GMT
I am trying to get a simple guestbook/shoutbox working for a buddy's site, but
am having trouble getting the form data to save back to the xml file. I can
load the xml into flash no problem. The server side script was written in php
and does not  look for a variable but uses "$HTTP_RAW_POST_DATA; " which I
guess just posts the data in raw format however it recieves it. I have not
however been able to find an asp equivalent to this. The php code is as
follows:
[Q]<?php
$file = fopen("guestbook.xml", "w+") or die("Can't open XML file");
$xmlString = $HTTP_RAW_POST_DATA;
if(!fwrite($file, $xmlString)){
    print "Error writing to XML-file";
}
print $xmlString."\n";
fclose($file);
?>[/Q]
I tried using this asp script, but with no luck:
[Q]<%
Dim objFSO, theFile, theData, objFileStream
set objFSO = Server.CreateObject("Scripting.FileSystemObject")
theFile = "guestbook1.xml"
theData = Request.Form("")

If Not objFSO.FileExists(theFile) Then
    ' I figure it is best to error check first
    Response.Write "Sorry, this file does not exist."
Else
    ' We have a file!
    set objFileStream = objFSO.OpenTextFile(theFile, ForAppending)
    objFileStream.WriteLine(theData)
    objFileStream.Close
    set objFileStream = nothing
    Response.Write theData
End If

set objFSO = nothing
%>[/Q]

Any help would be greatly appreciated. I am spending way to much time on this.
dan mode ->Adobe Community Expert - 30 Jul 2007 22:17 GMT
Kirupa has a php version here: http://www.kirupa.com/web/xml_guestbook.htm

Signature

Dan Mode
--> Adobe Community Expert
*Flash Helps* http://www.smithmediafusion.com/blog/?cat=11
*THE online Radio* http://www.tornadostream.com <--check this
***Stop Piracy http://www.adobe.com/aboutadobe/antipiracy/***

>I am trying to get a simple guestbook/shoutbox working for a buddy's site,
>but
[quoted text clipped - 39 lines]
> Any help would be greatly appreciated. I am spending way to much time on
> this.
cramerhwood - 31 Jul 2007 19:46 GMT
that's the problem, its in php.
adrian281990 - 17 Aug 2007 13:02 GMT
How do you load the XML file? and what ActionScript version your are using. I have a similar problem I ahve to load a XML file via ASP and I don't know how to do this?
Thank you,
Adrian
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.