Archive by Author

Uploading Files to Rackspace Cloud using PHP (Aka Mosso)

3 Apr

Rackspace Cloud Logo

Rackspace Cloud Logo

Uploading Files to Rackspace Cloud using PHP (Aka Mosso)

Uploading files directly from a PHP script to Rackspace Cloud is actually easier than you might think although there are not many tutorials for this kind of script, so we thought we’d share the information. We have also included the source code for this tutorial.

    1. First you will need a Rackspace Cloud Account, if you don’t have one, sign up here.
    2. Once you have a Rackspace Cloud Account you will need to download the Rackspace Cloud API, these are available here. For this tutorial you will need to download the PHP API.
    3. Extract and upload the folder and rename it to something sensible, we will rename it to “cloudapi”.
    4. Next we need a simple upload script, written in HTML:
<form action="upload.php" enctype="multipart/form-data" method="POST">
File: <input name="uploadfile" type="file" />
<input name="submit" type="submit" value="Upload" />
</form>

    1. Now we have the upload script we need the upload.php code:
<?php
// include the Cloud API.
require('cloudapi/cloudfiles.php');

//Required username and API key found in your account
$username = ""; //Username
$key = ""; //API key

//Connecting to Rackspace Cloud
$auth = new CF_Authentication($username, $key);
$auth->authenticate();
$conn = new CF_Connection($auth);

//Set the Container you want to use
$container = $conn->get_container('INSERTCONTAINERNAME');

//Temp store the file
$localfile = $_FILES['uploadfile']['tmp_name'];
$filename = $_FILES['uploadfile']['name'];

//Uploading to Rackspace Cloud
$object = $container->create_object($filename);
$object->load_from_filename($localfile);

//Completion Message
echo "Your file has been uploaded";
?>
  1. We will now run through the above code;
  • Line 03- ensure this file exists and the path is correct.
  • Line 06 & 07 – You will need to enter your Rackspace Cloud API key, this can be found in your account at Your Account -> API Access.
  • Line 15 – Insert your container name here, case may matter, so keep and eye out for your Capital Letters.

Download the Source Code Here.

Getting errors? Keep an eye out for our new blog post over the next couple of days where we will discuss errors and issues we had when trying to run this script and how you can solve them.

 

Edit

Tip:

For those folks with UK Rackspace accounts, you’ll need to use the following call when creating the $auth object:

$auth = new CF_Authentication($username, $key, NULL, UK_AUTHURL);

(as of v.1.7.9)

The reason being is that there are two different authentication URL’s for each client base.

Thanks to Anh for this tip.

VPS.NET now offers Offsite Daily Rsync Backups

1 Apr

vps.net logo

vps.net logo

Your data is very important, dispite being a cloud things can still go wrong, for example, you accidently clear the contents of a very important file, this file would be duplicated across the cloud,so your data isn’t complete safe.

VPS.NET now offers Offsite Daily Rsync Backups for an additional £4/$5 per month per VPS. Rsync is a software application for Unix systems which synchronizes files and directories from one location to another by using delta encoding to minize the data transfer.

It takes about 5 minutes to set up Rsync backups with easy to follow instructions.

New Rackspace Cloud Control Panel – Coming ‘Soon’

31 Mar

Rackspace Cloud Logo

Rackspace Cloud Logo

We here at Clloud, have heard a rumour that Rackspace Cloud will soon we releasing a revamped version of their control panel, probably within the next couple of months, which is suggested could include long awaited features such as CNAME support.

We are unsure at the moment if the revamped control panel will be for both Cloud Server and Cloud Files users, or if it will just affect Cloud Files users. We expect that it will be both with hopefully a wide range of new features.

When we find out more information we will update you all.

Happy Clloud’ing!

We test drive the Rackspace Cloud Iphone App

23 Mar

Rackspace Cloud IPhone Application Review

The Rackspace Cloud Iphone Application is Free of charge and is available from the App store.The Application allows you to connect to your account to manage your Cloud Servers and Cloud Files. We will be testing the Cloud Files part of the app in this blog post. You will need a Rackspace Cloud Account BEFORE using this App.

You will need to get your username and API key from your Rackspace Cloud Account, this is available in ‘Your Account -> API Access’. When you load up the app you will be asked to input these details. (The API is very long unfortunately, happy typing). Once you’ve done that it will authenticate your account…

Rackspace Cloud App Authenticating

Once you’ve logged in it will show you your Cloud Servers, if you have any, but we will continue to Cloud Files using the button in the bottom right. You will then see all your containers, for this example we will create a new container called ‘test’.

Rackspace Cloud App Containers

If we go into the container at the moment it will obviously have no files. With the Rackspace Cloud App you are able to upload images from your gallery or straight from your camera.

Rackspace Cloud App Upload

Rackspace Cloud App Upload

We will upload an image that we took earlier..

Rackspace Cloud App Uploading

Rackspace Cloud App Uploading

Usually it will complete quickly depending on if you are connected to Wifi or not. We were connected to Wifi at this time so it uploaded within 10 seconds, although if you are only on 3G it will take longer. Once it has uploaded you can view it straight from the App.

Rackspace Cloud App Uploaded File

Rackspace Cloud App Uploaded File

Our Review

The Rackspace Cloud App is a great addition to Rackspace’s current line up, with a lot of the features that the online control panel has. We would like to see a few more statistics in there (usage etc) and perhaps billing but you can’t complain, it’s free. Well worth the download.

Remember to check out our review of Rackspace Cloud Files!

http://c1126332.cdn.cloudfiles.rackspacecloud.com/rscloudapp4.png

Rackspace Cloud App Uploading

Rackspace Cloud App Uploading

Microsoft ‘staking its future’ on cloud computing

22 Mar

Around 70 per cent of Microsoft employees are working on cloud-related projects, and that figure will reach 90 per cent within a year, Mr Ballmer told an audience at the University of Washington. He said that he was “betting our company” on a move towards cloud-based software and services, and that there was “so much unrealised potential” in this sector.

“The cloud fuels Microsoft, and Microsoft fuels the crowd,” he said. “We’re all in.”

Cloud computing – the idea that software, files and services are not tied to an individual computer, but are in fact accessible everywhere, on any machine, via the internet – is a matter of increasing importance for technology companies.

Microsoft, which has traditionally earned most of its revenue from its operating systems and computer software, is keen to find ways of adapting this model for the internet age. The company has launched Windows Azure, a platform for developers to create cloud-based applications and services, and has also created online versions of popular programs, such as Word and PowerPoint.

Mr Ballmer said that although browsers lay at the heart of cloud services, the devices used to access these services really mattered. “The cloud wants smart devices,” he said, saying that the new Windows Phone 7 Series mobile operating system was designed with the cloud in mind, compared to previous versions of Windows Mobile, that were built for “voice and the legacy world”.

After his speech at the University of Washington, he sent an email to Microsoft staff reaffirming his commitment to the cloud initiative.

“Other companies have defined the cloud in a narrow, one-dimensional way,” he wrote. “Although these companies provide some interesting components, Microsoft is uniquely delivering on a wide range of cloud capabilities that bring increasingly more value to our customers.

“This view fuels our investments across the entire company, from datacenters to cloud platform technologies to cloud-based development tools and applications. Today, nearly every one of our products has, or is developing, features or services that support the cloud. As I said today, when it comes to the cloud, we are all in. We are all in across every product line we have and across every dimension of the cloud.

“Of course, there is more work to do. We have strong competitors. We need to be (and are) willing to change our business models to take advantage of the cloud. We must move at ‘cloud speed’, especially in our consumer offerings. And we need to be crystal clear about the value we provide to all our customers.

“We have an enormous opportunity in front of us. We have great products and services in the market today and a range of new ones on their way.

All of our products make the cloud better, and the cloud makes our products better.”

Midphase Hosting

2 Jul