-
XML and Cookies?
is it possible to store xml objects using cookies?
I tried to, but I would love it if someone has this figured out
just one object, thats all Im asking
thx for your time
-
Senior Member
XML can be outputted as a string so it should be no problem to store it anywhere. Which cookies are you talking about? Browser ones or one in flashs file cache?
Thanks
Luke
-
thx for the reply,
yahh I'm talking about browser cookies,
I tried to but when i retrieve the variables it seems to be converted to another format,
I can try to reconvert them into XML format but i have many different cases that complicates the situation,
is there an answer?
thx again
-
up to my .as in code
I think you basically have to obtain the variables and then construct as you see fit:
Save cookie (savecookie.php)
PHP Code:
<?
$first="A Fake Blog Example";
$second="http://sandbox.serveftp.org";
$third="A Fake News Story";
$fourth="A really long string saved as a news description.HHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH";
$expiryDate = mktime(0, 0, 0, 12, 25, 2030);
setcookie('first' , $first, $expiryDate);
setcookie('second' , $second, $expiryDate);
setcookie('third' , $third, $expiryDate);
setcookie('fourth' , $fourth, $expiryDate);
?>
Readback and construct (cookie.php):
PHP Code:
<?php
$first = $_COOKIE["first"];
$second = $_COOKIE["second"];
$third = $_COOKIE["third"];
$fourth = $_COOKIE["fourth"];
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n";
echo "<rss version=\"2.0\">\n\n";
echo "<channel>\n";
echo "<title>" . $first . "</title>\n";
echo "<description>" . $second . "</description>\n";
echo "<item>\n";
echo "<title>" . $third . "</title>\n\n";
echo "<description>" . $fourth . "</description>\n";
echo "</item>\n\n";
echo "</channel>\n";
echo "</rss>\n";
$file= fopen("results.xml", "w");
fwrite($file, $_xml);
fclose($file);
?>
Once you have the stored strings...start pushing them anywhere
End result: http://sandbox.serveftp.org/cookie.php
Last edited by Chris_Seahorn; 07-31-2005 at 10:55 AM.
-
thx for the reply chris I really appreciate it,
but were talking about shared objects not PHP
u know! that browser cookie thing that saves simple variables on ur pc
when i try to send an xml node through it the returned variables are not the same xml format, thats my problem
thx again for your reply really usfull info u posted
-
up to my .as in code
yahh I'm talking about browser cookies,
Sorry, that threw me...
So retrieve the shared objects in your movie and send them out as POST to populate the xml or construct the node from send outs. Can be a seemless move. I use that (POSTS from my read SO's that decide sql returns rather than populating an xml tree) for my bans.
Last edited by Chris_Seahorn; 07-31-2005 at 01:36 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|