Follow the simple steps below in order to embed an upload form in your site!

1. Fill in the required parameters

Required parameters

Optional configuration

from to
from to
from to
Mini x Large x
Mini x Large x
Mini x Large x


2. Put this code in your site

Fill in all of the required fields

3. Create a script to handle the uploaded files

This code must be placed on the pages, handling the "Redirect to URL on success" and "Redirect to URL on error". The example code is written in PHP, but you are free to use any programming language!

<?php
if ($_GET['uploaded']){
 // The user file was uploaded successfully
 $result = simplexml_load_file($_GET['4s_ok']); 
// the get avriable 4s_ok hold the URL on which the
// result of the upload is located (in XML format)
echo "<p>Your image is called {$result->file[0]->name}.
It is
{$result->file[0]->size} bytes big
and is
{$result->file[0]->format}</p>"; echo "<p>And here it is: {$result->file[0]->embed->website}</p>"; // You can also save the link (in DB) so
// it can be embeded in dynamic pages later on
} elseif ($_GET['error']){ $error = simplexml_load_file($_GET['4s_error']); echo "<p class='error'>Your image failed to upload with
message
{$error->file[0]['error']}</p>"; echo "<p>The attempted file upload is called {$error->file[0]->name}.
It is
{$error->file[0]->size} bytes big
and is
{$error->file[0]->format}</p>"; } ?>
Usage rules | FAQ | Help | Contact us
Created by Mediaone | Copyright © 2007 4storing.com