Results 1 to 5 of 5
Threaded View
-
21st Jun 2012, 06:48 PM #1OPMember
[Help] PHP Curl Lumfile.com Problem
Hi people! I Try upload files to this hosting, and get download link, but file does not appear in my files in my account.
this is my code:
PHP Code:function lumfile($user, $pass, $file) {
$login = curl_init();
curl_setopt_array($login, array(
CURLOPT_URL => 'http://lumfile.com/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEJAR => 'lumfile.cookie',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => "op=login&redirect=http%3A%2F%2Flumfile.com%2F&login=$user&password=$pass"
));
curl_exec($login);
curl_close($login);
$server = curl_init();
curl_setopt_array($server, array(
CURLOPT_URL => 'http://lumfile.com/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEFILE => 'lumfile.cookie'
));
$result = curl_exec($server);
curl_close($server);
preg_match('/action="(.*?)"/i', $result, $match);
preg_match_all('/value="(.*?)"/i', $result, $out);
$srv = $match[1];
$id = $out[1][3];
$tmp = $out[1][4];
$uid = '';
$i = 0;
while($i < 12) {
$uid .= rand(0,9);
$i++;
}
$up_url = $srv . $uid . '&js_on=1&utype=reg&upload_type=file';
$url = $up_url;
$upload = curl_init();
curl_setopt_array($upload, array(
CURLOPT_URL => $url,
CURLOPT_REFERER => 'http://lumfile.com/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEFILE => 'lumfile.cookie',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => array(
'upload_type' => 'file',
'sess_id' => $id,
'srv_tmp_url' => $tmp,
'link_rcpt' => '',
'link_pass' => '',
'file_0' => "@$file",
'tos' => '1',
'submit_btn' => 'Upload! '
)
));
$result = curl_exec($upload);
curl_close($upload);
preg_match("/name='fn'>(.*?)</i", $result, $dl);
$fn = $dl[1];
$getlink = curl_init();
curl_setopt_array($getlink, array(
CURLOPT_URL => 'http://lumfile.com/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_COOKIEFILE => 'lumfile.cookie',
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => "fn=$fn&st=OK&op=upload_result"
));
$res = curl_exec($getlink);
curl_close($getlink);
preg_match('@(https?://(?:www\.)?lumfile\.com/\w+(?:/[^\?|/|<|>|\"|\'|\r|\n]+)?(?:\.html)?)\?killcode=\w+@i', $res, $match);
return $match[1];
}
heppinnz Reviewed by heppinnz on . [Help] PHP Curl Lumfile.com Problem Hi people! I Try upload files to this hosting, and get download link, but file does not appear in my files in my account. this is my code: function lumfile($user, $pass, $file) { $login = curl_init(); curl_setopt_array($login, array( CURLOPT_URL => 'http://lumfile.com/', CURLOPT_RETURNTRANSFER => true, Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Lumfile Discussion Thread - Post your discussions related to Lumfile here.
By pcx2012 in forum File Host DiscussionReplies: 3Last Post: 30th Oct 2012, 05:53 AM -
lumfile.com Discussion Thread - Post your discussions related to Lumfile here.
By patchrapa in forum File Host DiscussionReplies: 3Last Post: 4th Jul 2012, 08:28 AM -
Lumfile Discussion Thread - Post your discussions related to Lumfile
By Mr.leg in forum File Host DiscussionReplies: 656Last Post: 24th Jun 2012, 03:03 AM -
cURL or PHP Problem.
By deelow66 in forum Technical and Security TutorialsReplies: 4Last Post: 2nd May 2010, 01:57 AM
themaCreator - create posts from...
Version 3.51 released. Open older version (or...