I tried to put up my own server, and if i am changing from userfile to file, and upload it from the web, it goes well, however, sending it from linphone isn't working unfortunatelly, here is my code to my sharing server:
<?php
function getExtension($str)
{
$i = explode('.', $str);
return strtolower(end($i));
}
if ($_FILES["userfile"]["error"] > 0)
{
return;
}
else
{
$size = ($_FILES["userfile"]["size"] / 1024);
if($size > 1000)
{
return;
}
$locdir = dirname(__FILE__);
$globdir = "
http://192.168.91.101/userdata";
$uploaddir = '/images/' . date('Y-m-d') . '/';
if (!is_dir($uploaddir)) {
mkdir($uploaddir, 0777);
}
$uploadfile = $uploaddir . uniqid() . '.' . getExtension($_FILES["userfile"]["name"]);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $locdir . $uploadfile))
{
echo $globdir . $uploadfile;
}
}
?>