<?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>sugardeath &#187; PHP</title>
	<atom:link href="http://sugardeath.net/category/site/php/feed" rel="self" type="application/rss+xml" />
	<link>http://sugardeath.net</link>
	<description></description>
	<lastBuildDate>Thu, 17 May 2012 05:42:55 +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>Break Things, Please!</title>
		<link>http://sugardeath.net/03/2009/break-things-please</link>
		<comments>http://sugardeath.net/03/2009/break-things-please#comments</comments>
		<pubDate>Thu, 26 Mar 2009 21:51:53 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[fanboyism]]></category>
		<category><![CDATA[Friends]]></category>
		<category><![CDATA[movies]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[web design (not really)]]></category>

		<guid isPermaLink="false">http://sugardeath.net/?p=2187</guid>
		<description><![CDATA[I posted this in my status on Facebook, but crossposting yields wider audiences.&#160; Amber conscripted me to build a simple submission and voting script for an upcoming Doctor Who fanvideo contest.&#160; I think I'm mostly done with it, which means that there's a ton of bugs to be fixed, naturally.&#160; I've already gotten the obvious [...]]]></description>
			<content:encoded><![CDATA[<p>I posted this in my status on Facebook, but crossposting yields wider audiences.&nbsp; Amber conscripted me to build a simple submission and voting script for an upcoming Doctor Who fanvideo contest.&nbsp; I think I'm mostly done with it, which means that there's a ton of bugs to be fixed, naturally.&nbsp; I've already gotten the obvious SQL injection one (look at one of the submissions on the vote page, it has a drop table statement in it that should've cleared all the submissions) and Richard already helped me fix one that came up if the page was open in two different tabs or browsers (just a simple check fixed it; a stupid one, but simple), but I want people to keep trying to break it.&nbsp; Amber doesn't need it until the end of April or so, so I've got plenty of time to beef it up if anything is found.&nbsp; </p>
<p>So, <a href="http://skaroawards.com/votetest/" title="Break me please :3">go for it</a>.&nbsp; Try all your stupid little user tricks, things I would never have thought of as the programmer (such as the multiple tab thing Richard showed me).</p>
<p>This project was really fun.&nbsp; I got to learn some more php, expand upon my sql, learn how to use sql within php, and probably most fun of all: learn how to use ajax.&nbsp; Since voters are to vote on multiple categories, I did not want to have to reload the page every time they voted in one category, that would be a waste of the voter's time.&nbsp; Especially when the page gets to be pretty long with a ton of submissions (I'm assuming it will get long (there's twenty-nine categories after all), and that there will be a ton of submissions).&nbsp; So, instead, when they vote on a category, it'll just collapse the form in that category into a "Thank you for voting!" message and the voter can go on unabated.&nbsp; I like it, it's really cool  :razz: </p>
<p>The thing logs based on IP address, so of course if you go to another computer and try to vote again, you'll succeed.&nbsp; And of course if you use a proxy, etc. etc.&nbsp; </p>
<p>--A dude just walked past my window and freaked me the hell out.&nbsp; Looks like he was checking something on the outside of the buildings.--</p>
<p>Amber said that the people who will be participating are unlikely to go about vote stuffing in this manner since... well, they're generally fourteen year old fangirls who know shit about computers (though they can kick my ass at video editing, that's for sure).&nbsp; </p>
<p>But yeah, try anything, everything.&nbsp; And if you break it or find something that you think might be broken, just leave a comment on this post.</p>
<p>Also, yes.&nbsp; It is intentionally ugly (this is Corey's big issue for some reason, and yet his IPRO site looks like it was made in frontpage).&nbsp; I plan to just php include() them into Amber's site later on and CSS the hell out of them.</p>
<p><a href="http://skaroawards.com/votetest/" title="Break me please :3">The link again.</a></p>
<p>I watched <em>A Dog's Breakfast</em> before going to bed last night.&nbsp; It was surprisingly good.&nbsp; It stars David Hewlett (Rodney McKay, <em>Stargate: Atlantis</em>), his sister Kate Hewlett (Jeannie Miller, Mckay's sister, <em>Stargate: Atlantis</em>), and Paul McGillion (Dr. Carson Beckett, <em>Stargate: Atlantis</em>; Young Dr. Ernest Littlefield, <em>Stargate: SG-1</em> "The Torment of Tantalus").&nbsp; The Hewletts again play siblings, with McGillion as Kate's actor fiancé.&nbsp; It started out a little.. slowish for me, but then just took a turn for the awesome.&nbsp; Especially the cameo by Christopher Judge (Teal'c, <em>Stargate: SG-1</em>).&nbsp; Holy hell.&nbsp; He plays such a serious character on SG-1, and while I knew he was a funny guy, I didn't realize just how awesome he could be.&nbsp; He really needs more comedy jobs.&nbsp; It's a small cast, and it's basically all Stargate regulars, but it's so refreshing to see them all outside of the Sci-Fi genre doing some good ol' comedy.</p>
<p>I recommend the movie, even if you aren't a fan of Stargate.&nbsp; David Hewlett's performance is top-notch and his chemistry with Kate is perfect (which probably has something to do with the fact that, you know, they're siblings and all).&nbsp; McGillion is great too (one of my all time favorite actors on <em>Atlantis</em>).&nbsp; </p>
<p>The Prometheus ship set/stage also makes an appearance, as McGillion's character is an actor on a really bad Sci-Fi show (where Rachel Lutrell, also of <em>Atlantis</em> fame, makes a cameo) that seemingly takes place aboard an advanced space ship.</p>
]]></content:encoded>
			<wfw:commentRss>http://sugardeath.net/03/2009/break-things-please/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Success!</title>
		<link>http://sugardeath.net/12/2005/success</link>
		<comments>http://sugardeath.net/12/2005/success#comments</comments>
		<pubDate>Sun, 04 Dec 2005 20:00:41 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sugardeath.net/12/2005/teh-w00t/</guid>
		<description><![CDATA[So.&#160; After who knows how long of not working on my plugin, I came to a revelation last night: Why bother replacing the spaces in the URLS with plusses??&#160; Browsers nowadays should be able to handle that with no problem!&#160; Opera replaces the spaces with "%20"s automatically.&#160; Firefox doesn't replace them, but can handle them [...]]]></description>
			<content:encoded><![CDATA[<p>So.&nbsp; After who knows how long of not working on my <a href="/e2-pipe-linker-plugin/" title="E2 Pipe Linker">plugin</a>, I came to a revelation last night: Why bother replacing the spaces in the URLS with plusses??&nbsp; Browsers nowadays should be able to handle that with no problem!&nbsp; Opera replaces the spaces with "%20"s automatically.&nbsp; Firefox doesn't replace them, but can handle them just fine.&nbsp; Same with Internet Explorer.&nbsp; So what was I even trying to do that?&nbsp; Hell, even Links behaves exactly like Firefox and IE!&nbsp; After realizing that and fixing the plugin as such, I now present to you... the <a href="/e2-pipe-linker-plugin/" title="E2 Pipe Linker">Everything2 Pipe Linker Plugin</a>!&nbsp; Download, share, use, abuse!&nbsp; Well, perhaps not abuse...&nbsp; but you get the idea!&nbsp; Hahaha!&nbsp; I'm so happy the thing is finally done!&nbsp; Huzzah!&nbsp; I even added a sink that allows one to use pipe links in comments!&nbsp; Go crazy!&nbsp; For those unacquainted with pipe links, see <a href="http://everything2.org/?node=pipe link" title="pipe link">this node</a>.&nbsp; They're really nifty things.</p>
<p>Check out the wp-plugins.net dowload link as well:<br />
<a href="http://wp-plugins.net/plugin/e2pipe/" title="E2 Pipe Link @ WP Plugins">http://wp-plugins.net/plugin/e2pipe/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sugardeath.net/12/2005/success/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I&#8217;m Thinking Green</title>
		<link>http://sugardeath.net/09/2005/im-thinking-green</link>
		<comments>http://sugardeath.net/09/2005/im-thinking-green#comments</comments>
		<pubDate>Wed, 21 Sep 2005 23:12:47 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[School]]></category>

		<guid isPermaLink="false">http://sugardeath.net/09/2005/im-thinking-green/</guid>
		<description><![CDATA[How about you? Anyone have any idea how one might go about creating a graph (specifically a line graph) with PHP?&#160; I wanna record and plot my connection speeds over a period of time (I've been having issues for the past two months or so).&#160; Plus I would learn more about PHP in the process. [...]]]></description>
			<content:encoded><![CDATA[<p>How about you?</p>
<p>Anyone have any idea how one might go about creating a graph (specifically a line graph) with PHP?&nbsp; I wanna record and plot my connection speeds over a period of time (I've been having issues for the past two months or so).&nbsp; Plus I would learn more about PHP in the process.</p>
<p>Um.&nbsp; Not much.&nbsp; I still haven't asked Ashley to Homecoming :cry:  Everytime I see her, I just get... scared, almost...&nbsp; I know I should ask her though, no matter what she says, at least I would have asked.&nbsp; We actually talked yesterday, though, so that was cool.&nbsp; Why I didn't ask her then, I don't know.</p>
<p>School is almost to the point of whipping my ass.&nbsp; Physics, while at first glance seems pretty easy, is actually very time consuming and challenging.&nbsp; I don't like it.&nbsp; Trig isn't bad, but I keep falling asleep in class.&nbsp; If only I could stay awake, then I would never have trig homework.&nbsp; We have homework everyday in English.&nbsp; German prepositions <em>are</em> kicking my ass.&nbsp; Sociology and Swim are my only classes I can really relax in.&nbsp; And even then, I can't really relax in swim...&nbsp; Problem is, they're both in the morning.&nbsp; Nice classes to wake up to, yes, but I'd like a break later in the day between the evil classes.</p>
<p>Can't have everything.</p>
<p>Apparently Opera went <a href="http://slashdot.org/article.pl?sid=05/09/20/1217232&#038;tid=95" title="Opera Free as in Beer">free a few days ago.&nbsp; Go <a href="http://opera.com" title="Opera.com">download</a> it and try it out.&nbsp; It took me a bit (read: well over an hour) to get everything how I wanted it, but once I goet everything set, I was happy.&nbsp; I was amazed at how much I could change and customized.&nbsp; It's crazy.&nbsp; It feels a bit more responsive than Firefox, I think I may be converting (gasp!)..&nbsp; </p>
<p>If you've always wanted to try Opera, but the ad-supported, free version scared you, and/or you were just to cheap to pay for the browser, I suggest you check it out NOW.&nbsp; It's really nice.</p>
<p>This doesn't mean I won't uninstall Firefox though.</p>
<p>PortableFirefox is a fscking godsend.&nbsp; Opera can't beat it there.</p>
<p>Why consider switching?<br />
1) Smaller download.<br />
2) Many features that are only availabe as extensions in Firefox come built in.<br />
3) Eats less RAM than Firefox.<br />
4) Looks damn nice.<br />
5) Why not?&nbsp; If you don't like it, simply uninstall it and go back to Firefox or Konqueror or Netscape or whatever (just as long as you don't go back to Internet Explorer, which hopefully isn't possible if Konqueror's on your system).</p>
<p>Monkey.</p>
]]></content:encoded>
			<wfw:commentRss>http://sugardeath.net/09/2005/im-thinking-green/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sweet</title>
		<link>http://sugardeath.net/06/2005/test-2</link>
		<comments>http://sugardeath.net/06/2005/test-2#comments</comments>
		<pubDate>Tue, 28 Jun 2005 01:45:54 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://sugardeath.net/06/2005/test-2/</guid>
		<description><![CDATA[Alright!&#160; I've got a basic example of what I want to happen! My Poem (without the spaces) becomes My Poem!! However!&#160; It doesn't replace the spaces in the URL with +'s yet, nor does it add the title attribute to the a tag... But!&#160; I DO have a script that does JUST that with a [...]]]></description>
			<content:encoded><![CDATA[<p>Alright!&nbsp; I've got a basic example of what I want to happen!</p>
<p><a href="http://everything2.org/?node= This is when it happens " title=" This is when it happens "> My Poem </a> (without the spaces) becomes <a href="http://everything2.org/?node=This is when it happens" title="This is when it happens">My Poem</a>!!</p>
<p>However!&nbsp; It doesn't replace the spaces in the URL with +'s yet, nor does it add the title attribute to the a tag...</p>
<p>But!&nbsp; I DO have a script that does JUST that with a fixed string (ie. NOT the random content produced whenever I post) over <a href="/wordpress/wp-content/plugins/test.php">here</a>.&nbsp; Thing is, it can only be done with one string right now.&nbsp; Somehow, I need to incorporate the second script into the currently functioning (albeit limited) plugin.&nbsp; I would need a way to search the $content for any string that starts with <a href="http://everything2.org/?node=, has " title=", has ">, and ends in </a>.&nbsp; I don't want [$any_text&#93; because that would include additions to quoted text, and even what little BBCode I use.&nbsp; Plus it just plain wouldn't work, as there would be no $result&#91;2&#93; to call for the link text.</p>
<p>All in all, I've still got a lot work ahead of me.&nbsp; I've managed to come this far, though, and I'm quite proud of myself.&nbsp; For <em>several hours</em> I was confused as all hell trying to figure out regular expressions, but I think I've got them pegged now.&nbsp; </p>
<p>Time to sleep.</p>
<div class="update">
<div class="udate">(6/28/2005 - 17:5)</div>
<p>Alright, plugin turned off for now, due to some major errors that it's causing with the wp-header.&nbsp; I'll try to figure that out in due time.</div>
<div class="update">
<div class="udate">(6/29/2005 - 3:24)</div>
<p>I lied!&nbsp; Plugin back up and running!&nbsp; No errors!</div>
]]></content:encoded>
			<wfw:commentRss>http://sugardeath.net/06/2005/test-2/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Awesomeness</title>
		<link>http://sugardeath.net/07/2004/awesomeness</link>
		<comments>http://sugardeath.net/07/2004/awesomeness#comments</comments>
		<pubDate>Fri, 09 Jul 2004 02:12:46 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[AndrAIa]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.trashfolder.org/satoshi/?p=628</guid>
		<description><![CDATA[Check it out: It's my very own little "progress" bar script that shows how far along I am to getting my computer!&#160; I didn't realize PHP could output graphics, that's so cool!&#160; This brought me back to the days of Demonica (a playerworld Paul and I used to work on for Graal).&#160; I created an [...]]]></description>
			<content:encoded><![CDATA[<p>Check it out:<br />
<img src="scripts/bar.php"><br />
It's my very own little "progress" bar script that shows how far along I am to getting my computer!&nbsp; I didn't realize PHP could output graphics, that's so cool!&nbsp; This brought me back to the days of Demonica (a playerworld Paul and I used to work on for Graal).&nbsp; I created an EXP, MP, and HP system MUCH different than that of the main Graal game (the main one was still there, one could never get rid of it entirely) and created little bars that could easily represent how much of whatever you had in a quick glance.&nbsp; The only real difference, however, was that the images weren't generated on the fly, I had to whip them up in Photoshop before hand.&nbsp; But this is so cool!&nbsp; Granted, I still have to edit the file to input a new value, but the fact that it will update everything else on it's own is awesome.&nbsp; There's also a vague little description of how I came up with the formula <a href="test/bartest.html">here</a>.&nbsp; There's probably a better way, but this way works.&nbsp; Now I just need to stick this progress bar in my sidebar.</p>
<p>edit:  Accomplishing this also brought me back out of my... um... "weird feeling"...&nbsp; Yea.&nbsp; Nothing like scripting to brighten one's day!&nbsp; Now I just need an [i]exact[/i] value instaed of 20.4.&nbsp; I chose that number because it sticks out in my head as my first paycheck ('twas just the training class) for some reason.</p>
<p>edit (12:20AM): Alright, exact value found.&nbsp; $20.89.&nbsp; Next paycheck should be a bit more, this last one was just the training class that I had.</p>
<p>edit (12:37AM): Added progress bar to the side bar under the "other" tab, resized and everything.</p>
]]></content:encoded>
			<wfw:commentRss>http://sugardeath.net/07/2004/awesomeness/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Soft Pajama Pants and PHP Scripts</title>
		<link>http://sugardeath.net/06/2004/soft-pajama-pants-and-php-scripts</link>
		<comments>http://sugardeath.net/06/2004/soft-pajama-pants-and-php-scripts#comments</comments>
		<pubDate>Tue, 15 Jun 2004 02:01:10 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.trashfolder.org/satoshi/?p=591</guid>
		<description><![CDATA[My mom just came back from the store and gave me a pair of pajama pants that are lighter and softer than the sweat pants I've been wearing.&#160; They're really nice, soft, and (most importantly) large!&#160; They're awesome, I won't be changing out of these for a looong time =P Earlier, Jason asked me if [...]]]></description>
			<content:encoded><![CDATA[<p>My mom just came back from the store and gave me a pair of pajama pants that are lighter and softer than the sweat pants I've been wearing.&nbsp; They're really nice, soft, and (most importantly) large!&nbsp; They're awesome, I won't be changing out of these for a looong time =P</p>
<p>Earlier, Jason asked me if I knew how to make a page (specifically, the <a href="/index.html">main TF page</a>) use a different style sheet based on the time of day.&nbsp; Jason was trying to do it with mod or something like that.&nbsp; I still have no clue what mod is, even though he tried to explain it to me.&nbsp; So, after a nice Tribes 2 session, I hopped on google and searched for '<a href="http://www.google.com/search?q=php+time+of+day+script&#038;sourceid=mozilla-search&#038;start=0&#038;start=0&#038;ie=utf-8&#038;oe=utf-8">php time of day script</a>.'&nbsp; I came across <a href="http://www.popnoff.com/main/scripts/down/hour.txt">this</a> nifty script which displays different greetings based on the time of day.&nbsp; Well, I just took it and stripped it down HEAVILY.&nbsp; It now only checks to see whether it's before 10PM, or after 10PM, and displays the appropriate stylesheet.&nbsp; </p>
<p>Also:  I added a link to <a href="http://questionablecontent.net">Questionable Content</a>, a hilarious comic about the life of an introverted guy, his anthropomorphic PC, and a chick that moved in with him after she caught her apartment on fire.&nbsp; It's awesome, and seeing as how they're only on comic #140, it'd be best to catch up now and read periodically, than to catch up once they hit #300 or so.</p>
]]></content:encoded>
			<wfw:commentRss>http://sugardeath.net/06/2004/soft-pajama-pants-and-php-scripts/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Updates</title>
		<link>http://sugardeath.net/06/2004/updates</link>
		<comments>http://sugardeath.net/06/2004/updates#comments</comments>
		<pubDate>Sun, 13 Jun 2004 20:09:28 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.trashfolder.org/satoshi/?p=589</guid>
		<description><![CDATA[Just some minor updates to the site that have accumulated over the past few days. First, the permalink no longer shows when there is only one post on the page.&#160; Second, it's not so obvious that there's a missing link (the admin-only "Edit this post") in the posted by line anymore.&#160; Third, I centered the [...]]]></description>
			<content:encoded><![CDATA[<p>Just some minor updates to the site that have accumulated over the past few days.</p>
<p>First, the permalink no longer shows when there is only one post on the page.&nbsp; Second, it's not so obvious that there's a missing link (the admin-only "Edit this post") in the posted by line anymore.&nbsp; Third, I centered the "next post | home | previous post" and changed the surrounding text from "< -" and "->" to "< <" and ">>", a little more obvious if you ask me, when a single post is displayed.&nbsp; Fourth, added a few more links in the sidebar (2 more friends, 1 more news, and 2 more other), and I also added the appropriate link relationships (XFN) for anyone under the friends heading.</p>
<p>Das ist alles.</p>
<p>Update:  Also got rid of the "posted by satoshi" because y'all know who's site this is, and i won't let anyone else post stuff on my site.&nbsp; And the time no longer displays the swatch internet time (beat time, for you PSO players), just 24 hour time.</p>
]]></content:encoded>
			<wfw:commentRss>http://sugardeath.net/06/2004/updates/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yar!&#160; Ph34r my l337 PHP skillz!</title>
		<link>http://sugardeath.net/06/2004/php-woo</link>
		<comments>http://sugardeath.net/06/2004/php-woo#comments</comments>
		<pubDate>Fri, 11 Jun 2004 21:09:34 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.trashfolder.org/satoshi/?p=582</guid>
		<description><![CDATA[I finally decided to mess around with PHP, and here's what I made!&#160; It's a VERY simple variable script, it just checks to see if a variable, $var, is equal to 'true' or not, and then displays text accordingly.&#160; It's awesome.&#160; I'm so proud of myself :-P.]]></description>
			<content:encoded><![CDATA[<p>I finally decided to mess around with PHP, and <a href="scripts/test.php">here's</a> what I made!&nbsp; It's a VERY simple variable script, it just checks to see if a variable, $var, is equal to 'true' or not, and then displays text accordingly.&nbsp; It's awesome.&nbsp; I'm so proud of myself :-P.</p>
]]></content:encoded>
			<wfw:commentRss>http://sugardeath.net/06/2004/php-woo/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

