function fpLogin($email, $pass) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://filepost.com/premium/login');
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'email=$email&password=$pass');
curl_exec($ch);
curl_close($ch);
}
function fpUpload($x) {
$file = array('file' => "@$x");
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://filepost.com/files/upload/regular/');
curl_setopt($curl, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $file);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2');
$res = curl_exec($curl);
curl_close($curl);
echo $res;
}
but still not working...
curl_setopt($ch, CURLOPT_POSTFIELDS, 'email=$email&password=$pass');
curl_setopt($ch, CURLOPT_POSTFIELDS, "email=$email&password=$pass");
curl_setopt($ch, CURLOPT_POSTFIELDS, 'email='.$email.'&password='.$pass);
feeling lazy SplitIce?hey has anyone actually written a web/http upload for this host? Im currently using FTP however web support would be nice.
<?php
/**
* written by mRAza
* 11-09-2011
*
*
* Usage: $link = upFilepost($user,$password,$cookie,$file);
**/
function upFilepost($user,$password,$cookie,$file){
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)Gecko/20030624 Netscape/7.1 (ax)";
$post = 'email='.$user.'&password='.$password;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://filepost.com/general/login_form/");
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://filepost.com/");
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
$result = curl_exec($ch);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://filepost.com/files/upload/");
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://filepost.com/");
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
$result = curl_exec($ch);
preg_match("#upload_url: '(.*)'#",$result,$upURL);
$upURL = $upURL[1];
preg_match("#SID: '(.*)'#",$result,$SID);
$SID = $SID[1];
$post = array();
$post['file']="@$file";
$post['SID']=$SID;
$post['Filename']= basename($file);
$post['Upload']="Submit Query";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $upURL);
curl_setopt($ch, CURLOPT_USERAGENT, 'Shockwave Flash');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
$result = curl_exec($ch);
preg_match("#answer\":\"(.*)\"#",$result,$answer);
$answer = $answer[1];
if ($answer ){
$url = 'http://filepost.com/files/done/'.$answer.'/?JsHttpRequest';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://filepost.com/");
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
$result = curl_exec($ch);
curl_close($ch);
preg_match("#id=\"down_link\" class=\"inp_text\" value=\"(.*)\"#",$result,$link);
if($link) {
return $link[1];
}
}
return false;
}
?>
I just tested and it is still working. did u test it before it was working for you?mRAza script does not work anymore![]()
Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.
Contact us