Ok I think I got the php file set up on my server, but I'm still getting this error, what do I check next?
here's my php file
<?php
/************************************************** *******
the custom uploader does a simple http post request to your url.
it expects the following return on error:
<upload><error>some error message here</error></upload>
it expects the following return on success:
<upload><url>http://someurlhere.com/blah.png</url></upload>
the xml return is whitespace-insensitive, so feel free to throw in
some newlines or whatever between tags if that be your thing.
remember, your script can do whatever it wants on the backend, but it MUST
use our return format. such is life.
daniel green / regis nebor
http://shup.com |
http://stashbox.org
************************************************** ********/
$file_input_name = "file";
$my_local_path = dirname(__FILE__).'/filez/';
$my_web_root = "http://pipelineaudio.net/shup/files/";
$filename = "";
$error = "";
function do_xml()
{
global $my_web_root;
global $filename;
global $error;
header('Content-type: text/xml');
if ($error)
die("<upload><error>$error</error></upload>");
die("\r\n\r\n<upload><url>" . $my_web_root . $filename . "</url><filename>" . $filename . "</filename></upload>\r\n\r\n");
}
$error = "";
if (!$_FILES)
{
$error = "No data was submitted. Try checking your browser settings and retry your request.";
do_xml();
}
$file = $_FILES[$file_input_name];
if (!$file)
{
$error = "The file was not uploaded properly.";
do_xml();
}
$filename = basename($file["name"]);
if (!move_uploaded_file($file["tmp_name"], $my_local_path . $filename))
$error = "Error saving file to disk.";
do_xml();
?>