rendered paste body<html>
<head>
<title>Profile2Task</title>
</head>
<body>
<form method="post" action="">
<input type="file" name="profile" value="Glider profile..." /> <br />
<input type="submit" name="convert" value="Convert" />
</form>
<?php
$putIt = "tmp/";
if (isset($_POST['convert'])) { // Button clicked?
if ($_FILES['profile']['size'] < 102400) { // 100kb or less
$newPath = $putIt.basename($_FILES['profile']['name']); // variable to path
if (move_uploaded_file($_FILES['profile']['tmp_name'], $newPath)) { // move the file
$Profile = new SimpleXMLElement(file_get_contents($newPath));
print_r($Profile);
}
else {
echo "An error occured while moving file\n<br />";
}
}
else {
echo "Filesize must be 100kb or less\n<br />";
}
}
?>