function rs_wpss_extra_notification_data($text, $spamshield_options = NULL) { if (empty($spamshield_options)) { global $spamshield_options; if (empty($spamshield_options)) { $spamshield_options = get_option('spamshield_options'); } } rs_wpss_update_session_data($spamshield_options); $post_jsonst = !empty($_POST[WPSS_JSONST]) ? trim($_POST[WPSS_JSONST]) : ''; $post_ref2xjs = !empty($_POST[WPSS_REF2XJS]) ? trim($_POST[WPSS_REF2XJS]) : ''; $post_jsonst_lc = rs_wpss_casetrans('lower', $post_jsonst); $post_ref2xjs_lc = rs_wpss_casetrans('lower', $post_ref2xjs); /* IP / PROXY INFO - BEGIN */ global $wpss_ip_proxy_info; if (empty($wpss_ip_proxy_info)) { $wpss_ip_proxy_info = rs_wpss_ip_proxy_info(); } extract($wpss_ip_proxy_info); /* IP / PROXY INFO - END */ if (strpos(WPSS_SERVER_NAME_REV, WPSS_DEBUG_SERVER_NAME_REV) === 0) { global $wpss_geolocation; if (empty($wpss_geolocation)) { $wpss_geolocation = rs_wpss_wf_geoiploc($ip, TRUE); } } else { global $wpss_geoloc_short; if (empty($wpss_geoloc_short)) { $wpss_geoloc_short = rs_wpss_wf_geoiploc_short($ip); } } /* Sanitized versions for output */ $wpss_http_accept_language = rs_wpss_get_http_accept(FALSE, FALSE, TRUE); $wpss_http_accept = rs_wpss_get_http_accept(); $wpss_http_user_agent = rs_wpss_get_user_agent(); $wpss_http_referer = rs_wpss_get_referrer(FALSE, TRUE, TRUE); /* Initial referrer, aka "Referring Site" - Changed 1.7.9 */ if (empty($spamshield_options['hide_extra_data'])) { $text .= "\r\n"; $text .= '-------------------------------------------------------------------------------------' . "\r\n"; $text .= __('Additional Technical Data Added by WP-SpamShield', WPSS_PLUGIN_NAME) . "\r\n"; $text .= '-------------------------------------------------------------------------------------' . "\r\n"; /* DEBUG ONLY - BEGIN */ if (strpos(WPSS_SERVER_NAME_REV, WPSS_DEBUG_SERVER_NAME_REV) === 0) { if (!empty($post_ref2xjs)) { $ref2xJS = addslashes(urldecode($post_ref2xjs)); $ref2xJS = str_replace('%3A', ':', $ref2xJS); $ref2xJS = str_replace(' ', '+', $ref2xJS); $ref2xJS = esc_url_raw($ref2xJS); $text .= "\r\nJS Page Referrer Check: {$ref2xJS}\r\n"; } if (!empty($post_jsonst)) { $JSONST = sanitize_text_field($post_jsonst); $text .= "\r\nJSONST: {$JSONST}\r\n"; } } else { if (!empty($post_ref2xjs)) { $ref2xJS = addslashes(urldecode($post_ref2xjs)); $ref2xJS = str_replace('%3A', ':', $ref2xJS); $ref2xJS = str_replace(' ', '+', $ref2xJS); $ref2xJS = esc_url_raw($ref2xJS); $text .= "\r\n" . __('Page Referrer Check.', WPSS_PLUGIN_NAME) . ': ' . $ref2xJS . "\r\n"; } } $text .= "\r\n"; $text .= __('Referrer', WPSS_PLUGIN_NAME) . ': ' . $wpss_http_referer . "\r\n\r\n"; /* Initial referrer, aka "Referring Site" - Changed 1.7.9 */ $text .= __('User-Agent (Browser/OS)', WPSS_PLUGIN_NAME) . ': ' . $wpss_http_user_agent . "\r\n"; if (strpos(WPSS_SERVER_NAME_REV, WPSS_DEBUG_SERVER_NAME_REV) === 0) { if (!empty($wpss_geolocation) && rs_wpss_is_lang_en_us()) { /* English only for now; TO DO: TRANSLATE */ $text .= __('Location', WPSS_PLUGIN_NAME) . ': ' . $wpss_geolocation . "\r\n"; } } else { if (!empty($wpss_geoloc_short) && rs_wpss_is_lang_en_us()) { /* English only for now; TO DO: TRANSLATE */ $text .= __('Country', WPSS_PLUGIN_NAME) . ': ' . $wpss_geoloc_short . "\r\n"; } } $text .= __('IP Address', WPSS_PLUGIN_NAME) . ': ' . $ip . "\r\n"; $text .= __('Server', WPSS_PLUGIN_NAME) . ': ' . $reverse_dns . "\r\n"; $text .= __('IP Address Lookup', WPSS_PLUGIN_NAME) . ': http://ipaddressdata.com/' . $ip . "\r\n\r\n"; $text .= '(' . __('This data is helpful if you need to submit a spam sample.', WPSS_PLUGIN_NAME) . ')' . "\r\n"; } return $text; }
function rs_wpss_extra_notification_data($text, $spamshield_options = NULL, $cf7 = FALSE) { if (empty($spamshield_options)) { global $spamshield_options; if (empty($spamshield_options)) { $spamshield_options = get_option('spamshield_options'); } } rs_wpss_update_session_data($spamshield_options); $post_jsonst = !empty($_POST[WPSS_JSONST]) ? trim($_POST[WPSS_JSONST]) : ''; $post_ref2xjs = !empty($_POST[WPSS_REF2XJS]) ? trim($_POST[WPSS_REF2XJS]) : ''; $post_jsonst_lc = rs_wpss_casetrans('lower', $post_jsonst); $post_ref2xjs_lc = rs_wpss_casetrans('lower', $post_ref2xjs); $eml_eol = "\r\n"; /* Added 1.9.7 */ if (!empty($cf7)) { $text .= $eml_eol; } /* IP / PROXY INFO - BEGIN */ global $wpss_ip_proxy_info; if (empty($wpss_ip_proxy_info)) { $wpss_ip_proxy_info = rs_wpss_ip_proxy_info(); } extract($wpss_ip_proxy_info); /* IP / PROXY INFO - END */ if (strpos(WPSS_SERVER_NAME_REV, WPSS_DEBUG_SERVER_NAME_REV) === 0) { global $wpss_geolocation; if (empty($wpss_geolocation)) { $wpss_geolocation = rs_wpss_wf_geoiploc($ip, TRUE); } } else { global $wpss_geoloc_short; if (empty($wpss_geoloc_short)) { $wpss_geoloc_short = rs_wpss_wf_geoiploc_short($ip); } } /* Sanitized versions for output */ $wpss_http_accept_language = rs_wpss_get_http_accept(FALSE, FALSE, TRUE); $wpss_http_accept = rs_wpss_get_http_accept(); $wpss_http_user_agent = rs_wpss_get_user_agent(); $wpss_http_browser = rs_wpss_get_browser(); $wpss_http_referer = rs_wpss_get_referrer(FALSE, TRUE, TRUE); /* Initial referrer, aka "Referring Site" - Changed 1.7.9 */ if (empty($spamshield_options['hide_extra_data'])) { if (!empty($cf7)) { $text .= $eml_eol; } $text .= $eml_eol; $text .= '------------------------------------------------------------------------------' . $eml_eol; $text .= __('Additional Technical Data Added by WP-SpamShield', 'wp-spamshield') . $eml_eol; $text .= '------------------------------------------------------------------------------' . $eml_eol; /* DEBUG ONLY - BEGIN */ if (strpos(WPSS_SERVER_NAME_REV, WPSS_DEBUG_SERVER_NAME_REV) === 0) { /* CF7 Only */ if (!empty($cf7)) { $wpss_log_session_data = rs_wpss_get_log_session_data(); extract($wpss_log_session_data); $noda = '[No Data]'; /* Timer - BEGIN*/ $wpss_time_end = microtime(TRUE); if (empty($wpss_time_init) && !empty($wpss_timestamp_init)) { $wpss_time_init = $wpss_timestamp_init; } if (!empty($wpss_time_init)) { $wpss_time_on_site = rs_wpss_timer($wpss_time_init, $wpss_time_end, TRUE, 2); } else { $wpss_time_on_site = $noda; } if (!empty($wpss_timestamp_init)) { $wpss_site_entry_time = get_date_from_gmt(date('Y-m-d H:i:s', $wpss_timestamp_init), 'Y-m-d (D) H:i:s e'); /* Added 1.7.3 */ } else { $wpss_site_entry_time = $noda; } /* Timer - END */ $wpss_hits_per_page = str_replace(WPSS_EOL, $eml_eol, $wpss_hits_per_page); $text .= "Pages Visited: " . $wpss_hits_per_page; $text .= "Time on Site: ['" . $wpss_time_on_site . "']" . $eml_eol; } if (!empty($post_ref2xjs)) { $ref2xJS = addslashes(urldecode($post_ref2xjs)); $ref2xJS = str_replace('%3A', ':', $ref2xJS); $ref2xJS = str_replace(' ', '+', $ref2xJS); $ref2xJS = esc_url_raw($ref2xJS); $text .= $eml_eol . "JS Page Referrer Check: {$ref2xJS}" . $eml_eol; } if (!empty($post_jsonst)) { $JSONST = sanitize_text_field($post_jsonst); $text .= $eml_eol . "JSONST: {$JSONST}" . $eml_eol; } } else { if (!empty($post_ref2xjs)) { $ref2xJS = addslashes(urldecode($post_ref2xjs)); $ref2xJS = str_replace('%3A', ':', $ref2xJS); $ref2xJS = str_replace(' ', '+', $ref2xJS); $ref2xJS = esc_url_raw($ref2xJS); $text .= $eml_eol . __('Page Referrer Check.', 'wp-spamshield') . ': ' . $ref2xJS . $eml_eol; } } $text .= $eml_eol; $text .= __('Referrer', 'wp-spamshield') . ': ' . $wpss_http_referer . $eml_eol . $eml_eol; /* Initial referrer, aka "Referring Site" - Changed 1.7.9 */ if (strpos(WPSS_SERVER_NAME_REV, WPSS_DEBUG_SERVER_NAME_REV) === 0 && !empty($_COOKIE['_referrer_og'])) { $text .= __('Clicky Referrer', 'wp-spamshield') . ': ' . $_COOKIE['_referrer_og'] . $eml_eol . $eml_eol; /* DEBUG ONLY - Added 1.9.7 */ } $text .= __('User-Agent (Browser/OS)', 'wp-spamshield') . ': ' . $wpss_http_user_agent . $eml_eol; if (!empty($wpss_http_browser)) { $text .= __('Browser', 'wp-spamshield') . ': ' . $wpss_http_browser . $eml_eol; } if (strpos(WPSS_SERVER_NAME_REV, WPSS_DEBUG_SERVER_NAME_REV) === 0) { if (!empty($wpss_geolocation) && rs_wpss_is_lang_en_us()) { /* English only for now; TO DO: TRANSLATE */ $text .= __('Location', 'wp-spamshield') . ': ' . $wpss_geolocation . $eml_eol; } } else { if (!empty($wpss_geoloc_short) && rs_wpss_is_lang_en_us()) { /* English only for now; TO DO: TRANSLATE */ $text .= __('Country', 'wp-spamshield') . ': ' . $wpss_geoloc_short . $eml_eol; } } $text .= __('IP Address', 'wp-spamshield') . ': ' . $ip . $eml_eol; $text .= __('Server', 'wp-spamshield') . ': ' . $reverse_dns . $eml_eol; $text .= __('IP Address Lookup', 'wp-spamshield') . ': http://ipaddressdata.com/' . $ip . "\r\n\r\n"; $text .= '(' . __('This data is helpful if you need to submit a spam sample.', 'wp-spamshield') . ')' . $eml_eol; } return $text; }