Stats from my media server!

By | Blog, C#, PHP | No Comments

So I recently wrote some code to show me stats on the media file types on my media server, and I thought the internet would like to see the pie chart I made! :3


Ill show my C# code and PHP code when I get the chance to sit down and type it out!

PHP: Redirecting

By | PHP | No Comments

Sometimes, you need to setup a structure that checks if a user is logged in. If a user is not logged in, then you should redirect to a login page instead of displaying the rest of the page. There is a very simple way to redirect the page, with the header() function. There are other commands you can send via headers, but for this tutorial we will only show the Location header.

header("Location: index.php");

In place of the index.php, you could put absolute paths, relative paths, or completely different domains as the url for redirection. Very easy to do. The only thing you should be aware of by using the header() function is that the page can not start outputting anything otherwise the header() function will throw an error. Say if you started the code with an echo function that displays text, the headers of the webpage would already be sent has text, and you can not edit the headers after they have already been sent.

SpiderBot Stats Test


By | Blog, SpiderBot | No Comments

I have not been posting recently mostly because its starting to be test 1 at McNeese soon, and I have been studying. During my free time however, I have been working on my senior project which I am calling SpiderBot. SpiderBot is a web spider that is written in C# using MySQL and PHP for the search engine. So far I have gotten it to be functional and not crash, as well as the ability to set it up on multiple machines to spread the work out on my (pretend) cluster. I decided I would post an image of the stats for it and see if anyone is interested in downloading it for themselves and tell me how awesome / sucky it is.

In other news, I went to Church Point today for Mardi Gras. Which Was AWESOME. Drunk people everywhere chasing chickens. BBQ Food and alcohol as far as your stomach could eat. And the BEADS. Jesus the beads. As far as I knew, they were rocket propelled pellets of death and currency here. I saw someone trade beads for jello shots. Heck, they were giving us beer and jello shots from the floats! 😀

Awesome times were had.