| 1264 | | $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] ); |
| 1265 | | $commentdata['comment_agent'] = substr($_SERVER['HTTP_USER_AGENT'], 0, 254); |
| | 1264 | if(!isset($commentdata['comment_author_IP'])){ // If IP is not passed in take the clients IP |
| | 1265 | $commentdata['comment_author_IP'] = $_SERVER['REMOTE_ADDR']; |
| | 1266 | } |
| | 1267 | $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '', $commentdata['comment_author_IP'] ); |
| | 1268 | |
| | 1269 | if(!isset($commentdata['comment_agent'])){ // If user agent is not passed in take the clients user agent |
| | 1270 | $commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT']; |
| | 1271 | } |
| | 1272 | $commentdata['comment_agent'] = substr($commentdata['comment_agent'], 0, 254); |