<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CodeDump &#187; actionscript</title>
	<atom:link href="http://codedump.tsdme.nl/category/actionscript/feed" rel="self" type="application/rss+xml" />
	<link>http://codedump.tsdme.nl</link>
	<description>A little blog where I write about my experiences while coding.</description>
	<lastBuildDate>Sat, 16 Oct 2010 18:42:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Cookies and Actionscript</title>
		<link>http://codedump.tsdme.nl/actionscript/cookies-and-actionscript</link>
		<comments>http://codedump.tsdme.nl/actionscript/cookies-and-actionscript#comments</comments>
		<pubDate>Thu, 10 Jul 2008 04:22:30 +0000</pubDate>
		<dc:creator>Ezra</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[cookies actionscript browser urlloader]]></category>
		<category><![CDATA[PHPSESSID]]></category>

		<guid isPermaLink="false">http://codedump.tsdme.nl/?p=4</guid>
		<description><![CDATA[I have been searching and searching today to find out a way to see the cookies that the server sends to you while downloading a page using URLLoader. I needed to read the PHPSESSID cookie that php send me so I could use it again in another URLLoader object so I could download some information [...]]]></description>
			<content:encoded><![CDATA[<p>I have been searching and searching <abbr class="datetime" title="2008-07-10">today</abbr> to find out a way to see the cookies that the server sends to you while downloading a page using URLLoader. I needed to read the PHPSESSID cookie that php send me so I could use it again in another URLLoader object so I could download some information that was protected behind a login. With one URLLoader object I sent the necessary form information to the login script and then I would transfer the PHPSESSID cookie to new URLLoader objects to download the information I wanted that was stored on different pages while still being authenticated with the correct session ID.</p>
<p>Sadly tho, after searching long I could not find anything that would tell me how to read the cookies from the URLLoader object or how to transfer them to the new objects. &#8211;I found a lot about the Flash Shared Object, but that was not what I was looking for, sadly&#8211;</p>
<p>I&#8217;m still not sure why, but for some reason I ran the code without copying the session ID to the new object to see what would happen and waddayaknow, I was getting the information I wanted. So somehow cookies are stored automatically from one URLLoader object to another, what struck me as strange, because I thought I would be starting with a clean sheet when I created a new object, not that cookies &#8211;and who knows what else&#8211; would be stored between them. So next time I will have to find out how to open multiple sessions at the same time, but I&#8217;ll do that when I&#8217;ll need to.</p>
<p>If anyone <strong>does</strong> know how to see what cookies were sent and what their value is, please let me know as I&#8217;m sure I could use it sometime.</p>
<p>P.S: For anyone wondering what I was making. My university has a special page with all my grades and ECTS credits and I wanted an easy way of checking them and maybe alerting me when the page was updated. So I decided to create it with <a title="Adobe Integrated Runtime" href="http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime" target="_blank">AIR</a> because some of my classmates &#8211;That might find it handy too&#8211; have macs while I use a pc, so it would be OS Independent.</p>
]]></content:encoded>
			<wfw:commentRss>http://codedump.tsdme.nl/actionscript/cookies-and-actionscript/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

