Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($_SERVER['REQUEST_METHOD'] == 'POST') {
- if (isset($_POST["name"]) && !empty($_POST["name"])) {
- if (isset($_POST["cookie"]) && !empty($_POST["cookie"])) {
- include_once 'includeFiles/fun.php';
- $xAction = array();
- $xData = array();
- $xDOMdata = array();
- $xHeader = array();
- $xHeader[] = 'accept: */*';
- $xHeader[] = 'accept-language: en-US;q=0.8,en;q=0.7';
- $xHeader[] = 'content-type: application/x-www-form-urlencoded';
- $xHeader[] = 'dnt: 1';
- $xHeader[] = 'origin: https://www.facebook.com';
- $xHeader[] = 'host: www.facebook.com';
- $xHeader[] = 'referer: https://www.facebook.com/';
- $xHeader[] = 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36';
- $xHeader[] = 'cookie: '.$_POST["cookie"];
- $ch = curl_init();
- curl_setopt($ch,CURLOPT_URL,"https://www.facebook.com/");
- curl_setopt($ch, CURLOPT_POST, 0);
- curl_setopt($ch,CURLOPT_FOLLOWLOCATION,false);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_COOKIESESSION, 1);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $xHeader);
- $result = curl_exec($ch);
- curl_close ($ch);
- $xDOMdata['xFbDtsg'] = between_last ('<input type="hidden" name="fb_dtsg" value="', '" autocomplete="off" />', $result);
- if (isset($xDOMdata['xFbDtsg']) && !empty($xDOMdata['xFbDtsg'])) {
- $ID = explode(";", $_POST["cookie"]);
- for ($i=0; $i < count($ID); $i++) {
- if (strstr($ID[$i], 'c_user' )) {
- $xID = str_replace("c_user","",$ID[$i]);
- break;
- }
- }
- if (isset($xID) && !empty($xID)) {
- for ($i=0; $i <= strlen($xID); $i++) {
- $xID = str_replace(' ','',$xID);
- $xID = str_replace('=','',$xID);
- }
- $xHeader = array();
- $xHeader[] = 'pragma: no-cache';
- $xHeader[] = 'accept: */*';
- $xHeader[] = 'accept-language: en-US,en;q=0.9,';
- $xHeader[] = 'cache-control: no-cache';
- $xHeader[] = 'content-type: application/x-www-form-urlencoded';
- $xHeader[] = 'origin: https://www.facebook.com';
- $xHeader[] = 'referer: https://www.facebook.com/pages/create/?ref_type=pages_you_admin';
- $xHeader[] = 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36';
- $xHeader[] = 'sec-fetch-dest: empty';
- $xHeader[] = 'sec-fetch-mode: cors';
- $xHeader[] = 'sec-fetch-site: same-origin';
- $xHeader[] = 'viewport-width: 772';
- $xHeader[] = 'cookie: '.$_POST["cookie"];
- $xData["page_name"] = $_POST["name"];
- $xData["super_category"] = "NON_BUSINESS_SUPERCATEGORY";
- $xData["ref_type"] = "pages_you_admin";
- $xData["category_id"] = 1402;
- $xData["address"] = "";
- $xData["city_and_state_id"] = "";
- $xData["zip_code"] = "";
- $xData["phone"] = "";
- $xData["is_street_address_optional"] = "false";
- $xData["is_street_address_hidden"] = "false";
- $xData["__user"] = $xID;
- $xData["__a"] = 1;
- $xData["__csr"] = "";
- $xData["__req"] = "k";
- $xData["__beoa"] = 0;
- $xData["__pc"] = "PHASED:DEFAULT";
- $xData["dpr"] = "1.5";
- $xData["__rev"] = "1001789558";
- $xData["__comet_req"] = 0;
- $xData["fb_dtsg"] = $xDOMdata['xFbDtsg'];
- $xData["jazoest"] = "22002";
- $xData["__spin_r"] = "1001789558";
- $xData["__spin_b"] = "trunk";
- $xData["__spin_t"] = "1583346258";
- $ch = curl_init();
- curl_setopt($ch,CURLOPT_URL,"https://www.facebook.com/pages/creation_flow/create_actual_page_with_checks/");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($xData));
- curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, $xHeader);
- $result = curl_exec($ch);
- curl_close ($ch);
- exit($result);
- }else {
- $xAction['status'] = "error";
- $xAction['message'] = "User ID Error";
- $xAction['code'] = "4";
- exit(json_encode($xAction));
- }
- }else {
- $xAction['status'] = "error";
- $xAction['message'] = "FbDtsg Error";
- $xAction['code'] = "3";
- exit(json_encode($xAction));
- }
- }else {
- $xAction['status'] = "error";
- $xAction['message'] = "Cookies Is Empty";
- $xAction['code'] = "2";
- exit(json_encode($xAction));
- }
- }else {
- $xAction['status'] = "error";
- $xAction['message'] = "page Name Is Empty";
- $xAction['code'] = "1";
- exit(json_encode($xAction));
- }
- }else {
- $xAction['status'] = "error";
- $xAction['message'] = "REQUEST METHOD ERROR";
- $xAction['code'] = "0";
- exit(json_encode($xAction));
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment