Results 1 to 10 of 10
-
8th Jan 2012, 11:18 AM #1OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro(API) Filesonic DownLoad Plugin!
just made it becoz someone me pm about it....
PHP Code:<?php
$filespath = dirname(__FILE__)."/files/";
$link = "http://www.filesonic.com/file/JHMyF1L";
$filename = getfsofilename($link);
$link = getfsolink($link);
$saveto = $filespath . $filename;
echo "<b>Downloading</b> ..........</br><b>Filename:</b> $filename</br><b>Link:</b> $link ....<br />";
curldlfile($link, $saveto);
function getfsofilename($link)
{
$user = "fsc user"; //
$pass = "fsc pass"; //
$page = $link;
$id = explode("/", $page);
$id = trim($id[4]);
$apicall = "http://api.filesonic.com/link?method=getDownloadLink&u=$user&p=$pass&ids=$id";
$page = file_get_contents($apicall);
preg_match('#\"filename\":\"(.*)\",\"url\"#', $page, $match1);
$filename = $match1[1];
return $filename;
}
function getfsolink($link)
{
$user = "fsc user"; //
$pass = "fsc pass"; //
$page = $link;
$id = explode("/", $page);
$id = trim($id[4]);
$apicall = "http://api.filesonic.com/link?method=getDownloadLink&u=$user&p=$pass&ids=$id";
$page = file_get_contents($apicall);
preg_match('#\"url\":\"(.*)\"}}},#', $page, $match);
$linksid = $match[1];
$link = str_replace("\/","/",$linksid);
return $link;
}
function curldlfile($link, $saveto)
{
$handle = fopen($saveto, 'w');
if ($handle)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $link);
curl_setopt($ch, CURLOPT_FILE, $handle);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
curl_exec($ch);
curl_close($ch);
fclose($handle);
}
else
{
echo "<br />Could not download $link. Is your 'files' folder chmodded to 777?";
exit();
}
}
?>
For php uploader:
curl downloa function:PHP Code:function curldlfile($link, $saveto)
{
$handle = fopen($saveto, 'w');
if ($handle)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $link);
curl_setopt($ch, CURLOPT_FILE, $handle);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
curl_exec($ch);
curl_close($ch);
fclose($handle);
}
else
{
echo "<br />Could not download $link. Is your 'files' folder chmodded to 777?";
exit();
}
}
Get Filename:
PHP Code:function getfsofilename($link)
{
$user = "fsc username";
$pass = "fsc password";
$page = $link;
$id = explode("/", $page);
$id = trim($id[4]);
$apicall = "http://api.filesonic.com/link?method=getDownloadLink&u=$user&p=$pass&ids=$id";
$page = file_get_contents($apicall);
preg_match('#\"filename\":\"(.*)\",\"url\"#', $page, $match1);
$filename = $match1[1];
return $filename;
}
Get Filelink:
PHP Code:function getfsolink($link)
{
$user = "fsc username";
$pass = "fsc password";
$page = $link;
$id = explode("/", $page);
$id = trim($id[4]);
$apicall = "http://api.filesonic.com/link?method=getDownloadLink&u=$user&p=$pass&ids=$id";
$page = file_get_contents($apicall);
preg_match('#\"url\":\"(.*)\"}}},#', $page, $match);
$linksid = $match[1];
$link = str_replace("\/","/",$linksid);
return $link;
}
PHP Code:$filename = getfsofilename($link);
$link = getfsolink($link);
$saveto = $filespath . $filename;
echo "<b>Downloading</b> ..........</br><b>Filename:</b> $filename</br><b>Link:</b> $link ....<br />";
curldlfile($link, $saveto);
saninokia Reviewed by saninokia on . (API) Filesonic DownLoad Plugin! just made it becoz someone me pm about it.... <?php $filespath = dirname(__FILE__)."/files/"; $link = "http://www.filesonic.com/file/JHMyF1L"; $filename = getfsofilename($link); $link = getfsolink($link); $saveto = $filespath . $filename; echo "<b>Downloading</b> ..........</br><b>Filename:</b> $filename</br><b>Link:</b> $link ....<br />"; Rating: 5
-
8th Jan 2012, 11:34 AM #2MemberWebsite's:
wscripts.net damnlolscript.com lulzjet.comyou are sure is working ?
From what i see there isn't downloading the file ....
-
8th Jan 2012, 11:39 AM #3OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
-
8th Jan 2012, 11:42 AM #4MemberWebsite's:
wscripts.net damnlolscript.com lulzjet.comwell, your title say Filesonic DownLoad Plugin!
most users will just copy the code and will say will not work, if this is a plugin for a script you should say in your post
-
8th Jan 2012, 12:02 PM #5OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
-
8th Jan 2012, 12:31 PM #6OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
-
8th Jan 2012, 01:42 PM #7MemberWebsite's:
epicimagehost.comYou can fetch filename and link in 1 api-call.
Now you're slowing yourself down and causing more work for the FileSonic Api..
-
8th Jan 2012, 01:53 PM #8OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
-
8th Jan 2012, 01:54 PM #9MemberWebsite's:
epicimagehost.comIn that case; good job
You can return an array containing multiple values.
PHP Code:function api_call(){
// ...
$return = array();
$return[] = $filename;
$return[] = $link;
return $return;
}
-
8th Jan 2012, 01:56 PM #10OPMemberWebsite's:
WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Filesonic Premium Download Plugin
By Hillside in forum File Host DiscussionReplies: 1Last Post: 7th Mar 2011, 06:30 AM -
Plugin download of filesonic & fileserve ?
By chipve in forum File Host DiscussionReplies: 6Last Post: 19th Feb 2011, 03:13 PM -
[Selling] FileSonic Download Plugin!
By CuTe BoY in forum Completed TransactionsReplies: 3Last Post: 9th Jan 2011, 09:03 AM -
Filesonic Download Plugin Need
By champ of champs in forum File Host DiscussionReplies: 15Last Post: 2nd Dec 2010, 11:35 AM -
filesonic download plugin
By trojan in forum Web Development AreaReplies: 3Last Post: 30th Oct 2010, 11:27 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...