
{
"name": "multiupload",
"hostprefix": "multiupload.com",
"displayname": "Multiupload",
"version": "1.0",
"majorversion": "3",
"minorversion": "2",
"minfirmware": "1834",
"authentication": "yes",
"module": "multiupload.php",
"class": "SynoFileHostingMultiupload",
"description": "Premium or free account not supported."
}
<?php
/* Copyright (c) 2011 Synology Inc. All rights reserved. */
require_once '/usr/syno/synoman/webman/modules/DownloadStation/hostscript/hosts/megaupload/megaupload.php';
class SynoFileHostingMultiupload extends SynoFileHostingMegaupload {
public function __construct($Url, $Username, $Password, $HostInfo)
{
parent::__construct($Url, $Username, $Password, $HostInfo);
$test = preg_match('/^http\:\/\/www\.multiupload\.com\/([0-9A-Z]+)$/', $this->Url, $matches);
if($test){
$this->Url = 'http://www.multiupload.com/MU_'.$matches[1];
}
}
protected function DownloadWaiting($IsLoadCookie)
{
$this->getMegauploadUrl();
return parent::DownloadWaiting($IsLoadCookie);
}
protected function DownloadPremium($CookieValue)
{
$this->getMegauploadUrl();
return parent::DownloadPremium($CookieValue);
}
protected function GetMegauploadUrl()
{
$test = preg_match('/^http\:\/\/www\.multiupload\.com\/([0-9A-Z]+)$/', $this->Url, $matches);
if($test){
$this->Url = 'http://www.multiupload.com/MU_'.$matches[1];
}
$ch = curl_init($this->Url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$c = curl_exec($ch);
if(preg_match('/Location\s?\:\s?([^\s]+)\s/i', $c, $matches)){
$this->Url = $matches[1];
}
}
}


Users browsing this forum: No registered users and 2 guests