$result = curl_helper_post($curl, $url, $post_data); if ($result == false) { curl_helper_error($curl, $url, $post_data); } $get_contacts = json_decode($result); curl_close($curl); output("get_contacts", $get_contacts); } // Examples of using the accessToken to perform Facebook Graph API calls. // Some other providers also offer API access via the provided accessToken. if ($provider == 'Facebook') { $access_token = $auth_info['accessCredentials']['accessToken']; $user_id = $auth_info['accessCredentials']['uid']; //Make a "feed" post. $post_data = array('access_token' => $access_token, 'message' => 'MESSAGE', 'picture' => 'http://www.janrain.com/favicon.png', 'link' => 'http://www.janrain.com', 'name' => 'NAME', 'caption' => 'CAPTION', 'description' => 'DESCRIPTION'); $url = "https://graph.facebook.com/{$user_id}/feed"; $curl = curl_init(); $result = curl_helper_post($curl, $url, $post_data); if ($result == false) { curl_helper_error($curl, $url, $post_data); } $graph_feed = json_decode($result); curl_close($curl); output("GRAPH feed post result", $graph_feed); // Pull the "me" profile $me = facebook_helper_get('https://graph.facebook.com/me', $access_token); output("GRAPH 'me' profile", $me); // Pull the "likes" $likes = facebook_helper_get("https://graph.facebook.com/{$user_id}", $access_token); output("GRAPH 'likes'", $likes); }
function uleak_create_backup() { global $wpdb; $scanner = new File_Uleak_Scanner(ABSPATH, array('start' => 0, 'fsl' => 600)); $scanner->run(); $scanner = new DB_Uleak_Scanner(); $scanner->run(); delete_transient('uleak_results_trans'); delete_transient('uleak_files'); $results = get_option('uleak_results'); $user_credentials = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . "uleak_customer" . ' WHERE id = 1 LIMIT 1'); foreach ($user_credentials as $key => $row) { $login['username'] = $row->username; $login['passwort'] = base64_decode($row->pwd); $login['apikey'] = $row->apikey; $portfolio_id = $row->portfolio_id; } if ($login['username'] != '' and $login['apikey'] != '' and intval($portfolio_id)) { $malware_results = $results['severe']; $vulnerable_results = uleak_get_vulnerable_transfer_results(); curl_helper_post($login, $malware_results, 'malware_result_transfer', $portfolio_id); curl_helper_post($login, $vulnerable_results, 'vulnerable_result_transfer', $portfolio_id); } }