Results 1 to 5 of 5
-
28th Oct 2011, 03:52 PM #1OPMember
why it give me error ? filesonic API download
Thanks for soft2050 for this code
<?php // Download Filesonic Link - Start (Coded By Soft2050)
$username='';
$password='';
$link='http://www.filesonic.com/file/2741198321/D1R3CT0Rs_kT_C1ty_C0urty4rd.rar';
function dlfsolink($link, $username, $password) {
$getidoflink = str_replace('/', '-', get_match('|/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?$|', $link, 1));
$getresult = file_get_contents("http://api.filesonic.com/link?method=getDownloadLink&u=$username&p=$passwor d&ids=$getidoflink&format=xml");
preg_match('/\<url\>(.*?)\<\/url\>/i', $getresult, $matches);
$link = trim($matches[0]);
return $link;
}
// Download Filesonic Link - Stop
echo dlfsolink($link,$username, $password);
?>
now it give me error
Fatal error: Call to undefined function get_match() in /home/****/public_html/ajax/ddl.php on line 5
please can any expert tell me what is the problem ?
hihotfile Reviewed by hihotfile on . why it give me error ? filesonic API download Thanks for soft2050 for this code <?php // Download Filesonic Link - Start (Coded By Soft2050) $username=''; $password=''; $link='http://www.filesonic.com/file/2741198321/D1R3CT0Rs_kT_C1ty_C0urty4rd.rar'; function dlfsolink($link, $username, $password) { $getidoflink = str_replace('/', '-', get_match('|/file/((+/)?+)(/.*)?$|', $link, 1)); Rating: 5
-
28th Oct 2011, 03:58 PM #2MemberWebsite's:
wscripts.net damnlolscript.com lulzjet.comfunction get_match() is missing
read the post where you found the code and find that function
-
28th Oct 2011, 04:00 PM #3Respected MemberWebsite's:
DL4Everything.com Soft2050.inAhh! The code which i pmed you , i forget to send the json function that i use
Add this function in the php file and it will work:
PHP Code:function get_match($regex,$content, $matchat) {
preg_match($regex,$content,$matches);
return $matches[$matchat];
}
-
28th Oct 2011, 04:02 PM #4It begins...
WHOAAAAAAAAAAAAAAAAAAA! That is some really fucked up code. Use this instead:
PHP Code:<?php
$username = "";
$password = "";
$link = "";
//STOP, U NO EDIT BELOW!
$link = trim($link);
$id = explode('/', $link);
$id = trim($id[4]);
$page = file_get_contents("http://api.filesonic.com/link?method=getDownloadLink&u=$username&p=$password&ids=$id&format=json");
$page = json_decode($page, TRUE);
$finallink = trim($page['FSApi_Link']['getDownloadLink']['response']['links'][$id]['url']);
echo $finallink;
//PROFIT!
?>
-
28th Oct 2011, 07:28 PM #5OPMember
First of all thanks soft2050 for he PM me download code
now thanks for Lifetalk i am using your code
---------------------------------------------------------
i add download code but its sucks :
Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.
----------------------------------------------------------------------------------------------------------------------------
$remote=$finallink;
$local='/home/********/public_html/ajax/test.zip';
function curl_download($remote, $local) {
$cp = curl_init($remote);
$fp = fopen($local, "w");
curl_setopt($cp, CURLOPT_FILE, $fp);
curl_setopt($cp, CURLOPT_HEADER, 0);
curl_exec($cp);
curl_close($cp);
fclose($fp);
}
curl_download($remote, $local);
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Filesonic Mega News - Everybody Must Read Now + 50 Free Premium Give Aways Here!
By FileSonic Hish in forum File Hosts Official SupportReplies: 355Last Post: 14th Jan 2012, 12:15 PM -
Anyone else get this error Filesonic
By YoungMike in forum File Host DiscussionReplies: 10Last Post: 14th Oct 2011, 10:38 AM -
Plz Give Solution for this Error
By Mr.WT in forum vBulletinReplies: 11Last Post: 3rd May 2011, 02:05 PM -
Please give me plugin for RL "filesonic premium download plugin"
By ThumperTM in forum General DiscussionReplies: 7Last Post: 7th Apr 2011, 06:27 AM
themaManager - edit and manage...
Version 4.18 released. Open older version (or...