upload_GS($sourcefile, $targetfile, $secret_key, $authkey)
Embedded into a IF statement:
Seeing as the function that i created returns either TRUE or FALSE on success or failure, it is pretty simple to integrate into an IF statement.
if(!upload_GS(“/home/username/public_html/mymp3.mp3”, “/mymp3.mp3”, “SECRET”, “ACCESS_KEY”)) {
$error = “Critical Error!”;
} else {
// Insert into database? Do an action? Up to you!
}
The above PHP script will either insert data into a database or return an error. I hope you manage to integrate this into your scripts. If you want to make any modifications then feel free to and please do leave a comment. I am always up for improving my scripting skills.
There MAY be errors if you directly copy and paste the code because it is a slightly modified version of a script that is currently in use.
THIS WEBSITE IS NO LONGER ACTIVE BUT THE SCRIPT SHOULD STILL BE IN PERFECT WORKING CONDITION.
End Result: http://directlinkhosting.cz.cc/
Please excuse the really bad template which was taken from the glype proxy.. Designing is not my strongpoint.. The concept however works perfectly! 🙂
Enjoy!
Attachment: http://blog.umarsalim.com/wp-content/uploads/2011/01/functions_GS.txt