April
25
2008
6:21 pm
Tags:
Post Meta :
You Diggin?

Alarm image

Every once in a while, I challenge myself, I think of a small application that might be useful to me and time myself to see how much time it took me to write it. The latest one, the one I did yesterday night, was an alarm clock which plays mp3 files as the alarm tone (took me 2 hours, I’m not pleased at all). Anyway, I decided to post the app here and maybe someone might use it :) I called it FreeAlarm v0.1, it’s one executable file, no installations or anything and should work on all Windows OS. Let me know what you think of it!

The source code (written in C#) isn’t documented (not part of challenge, takes time :) ) but it’s pretty straight forward, I don’t mind uploading it if I get requests for it.


Click here to download FreeAlarm

August
14
2007
1:23 pm
Tags:
Post Meta :
You Diggin?

Level: Beginner (coder)

This is a small tutorial which will teach you how to upload files using a C# client application to a server running PHP.

We’ll call the PHP script “upload.php”, this is what it should contain:

<?php
$uploaddir
= ‘upload/’; // Relative Upload Location of data file

if (is_uploaded_file($_FILES[‘file’][‘tmp_name’])) {
$uploadfile = $uploaddir . basename($_FILES[‘file’][‘name’]);
echo
“File “. $_FILES[‘file’][‘name’] .” uploaded successfully. “;


if (move_uploaded_file($_FILES[‘file’][‘tmp_name’], $uploadfile)) {
echo
“File is valid, and was successfully moved. “;
}

else
print_r($_FILES);
}

else {
echo “Upload Failed!!!”;
print_r($_FILES);
}
?>

(more…)