//====================================================================================
// OCS INVENTORY REPORTS
// Copyleft Pierre LEMMET 2005
// Web: http://ocsinventory.sourceforge.net
//
// This code is open source and may be copied and modified as long as the source
// code is always made freely available.
// Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt
//====================================================================================
//Modified on 08/20/2006
if(is_uploaded_file($_FILES['userfile']['tmp_name'])) {
$fd = fopen($_FILES['userfile']['tmp_name'], "r");
$contents = fread($fd, filesize ($_FILES['userfile']['tmp_name']));
fclose($fd);
$result = post_it($contents, "http://".LOCAL_SERVER."/ocsinventory");
if (isset($result["errno"])) {
$errno = $result["errno"];
$errstr = $result["errstr"];
echo "