In it’s simplest form, this project will allow you to serve files that are outside of the website folder structure to an end user – ok in other words you hide the real download location of your files.
You are a software company providing widget XYZ that costs $199 to purchase. In the past you had a secret hidden folder structure which was www.widget.com/securefiles/widgetxyzrelease.exe
This link was available to anyone once they purchased your software, however the probem was that this link could be passed around to anyone and everyone so not very secure.
What you actually want to do is provide a link like http://www.widget.com/your-account?file=widgetxyz and for your site to determine via it’s authentication system whether you were allowed to access it or not – if you have paid, you could provide this link which will then check you are logged in, check you are allowed to download it and then return the file to your browser for you to download. Much more secure.
Ok this is how you could set it up:
* Your site is setup in c:inetpubwwwrootmySite
* Your secured files are outside of the wwwroot so c:inetpubmysecurefiles*.* (this is where you dump your exes and other secure files)
* You ensure when your user purchases your software, they are logged into the site as a user and redirect them to the your-account page.
* This page has a user control that checks the query string, provides a mechanism to pull the file from the secure folder and serve to the user
Thats pretty much it.
I’m looking for collaborators for this package/project to improve and expand upon it’s core functionality. Things that could be added are:
* Customisable filetypes – currently only supports pdf, exe, msi and zip
* Embedding Google Analytics for tracking downloads against purchases/users
* anything else?
Source is included (7 zip file) and is currently compiled as .net 4.0 solution, if you are not using 4.7, you will need to recompile and relink in the correct version Umbraco dll’s for it to work – should work in all versions of Umbraco 4.x onwards
Finding the right developer for your Umbraco project is all about being assured that the developer you pick has the skills you need.
There is only one way to become a certified Umbraco developer, by attending one the many Umbraco training classes. There developers get up to date knowledge from qualified trainers, ensuring that an Umbraco certified badge actually stands for a certain skillset and knowledge.
Great news, Simon has just obtained his certification to prove he can do all this and more.
<xsl:when test=”$currentPage/@nodeName = ‘HOME'”>
<img src=’/images/logo1.png’ alt=’This is logo 1′ class=’logomargin’ />
<!–<h1>Add some text here if you like</h1>–>
<img src=’/images/logo2.png’ alt=’This is logo 2 for another page’ class=’logomargin’ />
<!–<h1>Add different text here also</h1>–>
Today I released a new version of the Simon Antony freelance developer website – it now covers all the areas I specialise within and hopefully gives my clients a new portal to visit. Over the coming months, more content will be added, including the ability for recruiters and clients to have their own login area and download files specific to them i.e. documentation, CV etc
As a freelance IT guy, I occasionally get cause to work on technologies I don’t usually mess around with. I last did any PHP work over 10 years ago so obviously I am rusty but a trusty google search provided me all the information I needed. Here are some of the useful functions / methods / tips i’ve recently used on projects.
Upload file using FTP
// FTP access parameters
$host = 'ftp.example.org';
$usr = 'example_user';
$pwd = 'example_password';
// file to move:
$local_file = './example.txt';
$ftp_path = '/data/example.txt';
// connect to FTP server (port 21)
$conn_id = ftp_connect($host, 21) or die ("Cannot connect to host");
// send access parameters
ftp_login($conn_id, $usr, $pwd) or die("Cannot login");
// turn on passive mode transfers (some servers need this)
// ftp_pasv ($conn_id, true);
// perform file upload
$upload = ftp_put($conn_id, $ftp_path, $local_file, FTP_ASCII);
// check upload status:
print (!$upload) ? 'Cannot upload' : 'Upload complete';
Create a unique filename
$ourUniqueFilename = uniqid() . '.txt'; // generate a unique filename with the txt extension
// do some stuff to throw an error
catch(Exception $e)//catch exception
echo 'Caught exception: ', $e->getMessage(), "n";
A couple of ways to stop client side validation firing, especially when using non asp.net controls: