Hello,

I am having problem in megaupload upload plugin. It is uploading the file but not to my account. you can say its in air.
It seems to be more cookie, temp file problem.
muUser and muPass are saved in accounts.php

Problem:

Its not making temp file in /temp/mu.ul"
code: $muCookie = $dirname(__FILE__)."/temp/mu.ul";

Logs:
Uploading to Megaupload

Notice: Undefined variable: dirname in /var/www/html/phpuploader/include/functions.php on line 4
Megaupload upload plugin:

function uploadMU($fileup) {
global $muUser; global $muPass;
$linksMU = array();
$muCookie = $dirname(__FILE__)."/temp/mu.ul";
//Login module
$post = array();
$post['login'] = '1';
$post['username'] = $muUser;
$post['password'] = $muPass;

$url = "http://megaupload.com/?c=account";

$page = postHost($url, $post, $muCookie);

foreach ($fileup as $value) {
//Upload module
$page = postHost("http://megaupload.com/",'',$muCookie);

$server = cut_str($page, 'flashvars.server = "','";');
$s = rndNum(6);
$rand = rndNum(21);
$ID= '0'.time().$rand;
$upload_form = $server."upload_done.php?UPLOAD_IDENTIFIER=$ID&use r=undefined&s=$s";
$url = $upload_form;

echo "Debug : Upload url =>".$url;
//Add description here
$mu_desc = "Default description";

$fpost = array();
$fpost["Filename"] = basename($value);
$fpost["message"] = $mu_desc;
$fpost["trafficurl"] = 'undefined';
$fpost["user"] = 'undefined';
$fpost["hotlink"] = '0';
$fpost["Upload"] = 'Submit Query';
$fpost["Filedata"] = "@".$value;

$upfiles = postHost($url,$fpost,$muCookie);

preg_match('/downloadurl *= *\'(.*?)\'/i', $upfiles, $dllink);

if($dllink[1]){
$download_link = $dllink[1]."&name=".basename($value);
$nameoffile = str_replace("rared/", "", $value);
$linksMU[] = $downloadlink;
}
}
$rowsc = count($linksMU);
echo "<br />";
echo "Megaupload Download Links";
echo "<br />";
echo "<textarea Name=\"update\" cols=\"80\" rows=\"$rowsc\">";
foreach ($linksMU as $MUpart) {

echo "$MUpart";
echo " \n";
}
echo "</textarea>";
echo "<br />";
return $linksMU;
}



Please help :)
automan Reviewed by automan on . [Help] Having problem in Megaupload upload plugin - Code Inside Hello, I am having problem in megaupload upload plugin. It is uploading the file but not to my account. you can say its in air. It seems to be more cookie, temp file problem. muUser and muPass are saved in accounts.php Problem: Its not making temp file in /temp/mu.ul" code: $muCookie = $dirname(__FILE__)."/temp/mu.ul"; Rating: 5