urlencode(@$_POST["answer"]), 'otherplugin' => urlencode(@$_POST["opinfo"]), 'otherinfo' => urlencode(@$_POST["oinfo"]), 'plugin' => urlencode($cpabcal_plugin_data['Name']), 'pluginv' => urlencode($cpabcal_plugin_version), 'wordpress' => urlencode(get_bloginfo( 'version' )), 'itime' => urlencode($time), 'phpversion' => urlencode(phpversion ()) ); if (@$_POST["onymous"] == 'false') // send this data only if explicitly accepted { $current_user = wp_get_current_user(); $data['email'] = urlencode($current_user->user_email); $data['website'] = urlencode($_SERVER['HTTP_HOST']); $data['url'] = urlencode(get_site_url()); } //extract data from the post //set POST variables $url = 'https://wordpress.dwbooster.com/licensesystem/debug-data.php'; $fields = $data; //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string, '&'); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_POST, count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); //execute post $result = curl_exec($ch); //close connection curl_close($ch); wp_die(); // this is required to terminate immediately and return a proper response } function cpabcal_feedback_javascript() { global $cpabcal_plugslug, $cpabcal_supportlink, $cpabcal_supportlink_full; ?>