Kirupa has a php version here:
http://www.kirupa.com/web/xml_guestbook.htm --
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/***
[quoted text, click to view] "cramerhwood" <webforumsuser@macromedia.com> wrote in message
news:f8da1s$7c5$1@forums.macromedia.com...
>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.
>