PHP - Trying To Remove Spam Link From Footer.
Hey,
I have a downloaded theme which appears to have hidden spam link in the footer somewhere, but I'm having a hard time locating the source. Here is the site: www.yourvancouvermortgagebroker.ca At the very bottom of the source, you can see: Code: [Select] <script type='text/javascript' src='http://www.yourvancouvermortgagebroker.ca/wp-content/plugins/contact-form-7/jquery.form.js?ver=2.47'></script> <script type='text/javascript' src='http://www.yourvancouvermortgagebroker.ca/wp-content/plugins/contact-form-7/scripts.js?ver=2.4.2'></script> <a href ="http://wp2blog.com"><img src="http://www.yourvancouvermortgagebroker.ca/wp-content/themes/Minimal/images/blank.gif" height="1" width="1" /></a> </body> </html> I've tried de-activating the plugins and it's still there (so it's not a plugin). I've also changed themes and it disappears, so it's only this theme. Here is functions.php: Code: [Select] <?php require_once(TEMPLATEPATH . '/epanel/custom_functions.php'); require_once(TEMPLATEPATH . '/includes/functions/comments.php'); require_once(TEMPLATEPATH . '/includes/functions/sidebars.php'); load_theme_textdomain('Minimal',get_template_directory().'/lang'); require_once(TEMPLATEPATH . '/epanel/options_minimal.php'); require_once(TEMPLATEPATH . '/epanel/core_functions.php'); require_once(TEMPLATEPATH . '/epanel/post_thumbnails_minimal.php'); $wp_ver = substr($GLOBALS['wp_version'],0,3); if ($wp_ver >= 2.8) include(TEMPLATEPATH . '/includes/widgets.php'); ?> and footer.php: Code: [Select] <div id="footer" > <div id="footer-content"> <ul id="bottom-menu"> <?php global $is_footer, $page_menu, $category_menu; $is_footer = true; elegant_init(); if (get_option('minimal_home_link') == 'on') { ?> <li <?php if (is_front_page()) echo('class="current_page_item"') ?>><a href="<?php bloginfo('url'); ?>"><?php _e('Home','Minimal'); ?></a></li> <?php }; ?> <?php if ($category_menu <> '<li>No categories</li>') echo($category_menu); ?> <?php echo $page_menu; ?> </ul> <!-- end ul#bottom-menu --> </div> <!-- end #footer-content --> </div> <!-- end #footer --> </div> <!-- end #page-wrap --> <?php include(TEMPLATEPATH . '/includes/scripts.php'); ?> <?php wp_footer(); ?> </body> </html> Where should I look from here? The link switches every once and a while if that's relevant. I've tried a full text search of all the files for the actual link and it never shows up. Thanks Similar TutorialsI have finaly got my removing recods page working, but i do have one problem... i have a delete button which goes to a new php page which contains the DELETE FROM, this deletes the record automaticaly. There are two paths which i could choose from the problem is i am stuck on both of them. 1. a link that will activate the delete code. 2. once the record has been deleted then it will automaticaly go back the the first page. can any one help me here please? Hi All, I am a newbie to php and I have this issue. I would appreciate if anyone can help out. I tried a few things but was not able to come up with a solution. From reading few codes and learning from it, I created this function in query.php and am calling this function in uk.php file, but the problem is that it loads and shows the data in table, but then it stops loading page from there on and the footer which is in html code after the place where I am calling this function does not load. I tried removing return false; command, but with that it loads the footer, but it shows the table after the footer. I want the table with data to show in between header and footer. Can you guys let me know what I need to do to achieve that? File Name: query.php
function uk() { $output = ''; $result = db_query("SELECT * FROM lecture where groups='uk'"); if(mysqli_num_rows($result) > 0) { $output .= '<div id="style2" style="overflow-x:auto;"> <table> <tr> <th class="text-center">Date</th> <th class="text-center">Title</th> <th class="text-center">Venue</th> <th class="text-center">Duration</th> <th class="text-center">Size (MB)</th> <th class="text-center">Link</th> </tr>'; while($row = mysqli_fetch_array($result)) { $output .= ' <tr> <td>'.$row["mydate"].'</td> <td>'.$row["title"].'</td> <td>'.$row["venue"].'</td> <td>'.$row["duration"].'</td> <td>'.$row["size"].'</td> <td><a href="../'.$row["path"].$row["file_name"].'">Save</a></td> </tr> '; } echo $output; } else { echo 'Data Not Found'; } }
File Name: uk.php
Header html code here Some body text <?php include '../includes/query.php'; uk(); return false; ?> Footer html code here
ive been geting attacked by a spam bot it is inserting gibrish in one of my contact forms. i managed to block it with Code: [Select] if (empty($_POST['Email']) && !empty($_POST['CustomerEmail'])) Email is an empty text field with display:none for sometime it was clean and now it succeeds once in a while to insert a form. i dont want to use captcha , i think i will loose clients your advise Hey My site is getting alot of spam and i need a way to keep up with what is being sent with some kinda system that will flag things which contain urls and chosen keywords. Problem i faced though was lets say a keyword was: skyspider Now some one could say sky or spider (as seperate words) but they still flagged. So "theres a spider in the sky" would be flagged when i only want "skyspider" flagged... does that make sense? What php function do i require to do such string checks like this? Thanks Hi.. I want to implement a program for identifying spam emails using an algorithm naive bayes in php.. How to implement this ..can any one help me.. thanks in advance A form is filled and the information is emailed to my address. The problem is it goes to the spam folder. Is it a problem with the email filter? I suppose I could whitelist the email address the server uses to email the info, but then spam would get through as well. Any ideas? I 'm having some problem while sending mails . i am sending bulk mails using php script, der is no problem in the script. i hope some guys have faced similar issue. while i am sending bulk emails, i figured out that - few mails are going to spam not into their INBOX. can you guys pls give some hint to resolve this issue. .. Hi This subject doesn't really have a category but is driving me mad. I use the mail() function to send out emails to a news group forum that I have created. This forum does the same. I am getting the emails placed in a spam folder. Is there any way around this. I have been told that it has something to do with no reverse DNS. I get emails like DoNotReply@bt.com. This email address doesn't exist. How does the email system know this, and is there a way around it. TIA Desmond. im having some robots injecting gibberish i wnat to deny amy links in the requesttext of the form for some reason i tested it and it accepted a http link Code: [Select] if (preg_match("/http/i","$RequestText")){ exit();} thanks i got the below code from google, need to adapt it to use, it works, but i just need it to over write on the file instead of appending to the file , please help, i am not a coder nor understand much of this, if someone could change it for me please: function logText($text) { $ts = date("D d-m-y h:i A",time()); $toLog = "[" . $ts . "] " . $text; $fh = fopen("logFile.txt", 'a'); fwrite($fh, $toLog."\n"); fclose($fh); }Edited December 13, 2020 by requinix This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=320638.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=354848.0 The script below works but it goes straight to the junk folder only since i added the parts below to the form. (the form is in another file) How do i stop it from going to the junk folder. Quote $error = $_GET['error']; $httpagent = getenv ('HTTP_USER_AGENT'); $url = $_SERVER['HTTP_REFERER']; Code: [Select] <?php require_once "Mail.php"; $optional = $_POST['optional']; $error = $_POST['error']; $url = $_POST['url']; $httpagent = $_POST['browser']; $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; $from = "Web server <removed>"; $to = "Admin <removed>"; $subject = "Someone has submitted an error."; $body = "Someone has submitted an error.\n". "Error: $error\n". "URL: $url\n". "Web browser: $httpagent\n". "Anything else you want to add?: $optional\n". "IP: $ip\n"; $host = "removed"; $username = "removed"; $password = "removed"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { header('Location: thank-you.html'); } ?> Hi; I had an email from my hosting company which said that my account was hacked and one script in images folder is trying to send thousands of spams(file name : "/public_html/images/sm5vy7.php"). they blocked my account and asked me to check if there is any script or code that may cause this problem. The only server side page I had was a contact.php file that has mail() function in it. the code is like this; "if( isset($_POST['submit'])) { $name=$_POST['name']; $comment=$_POST['comment']; $email=$_POST['email']; $phone=$_POST['phone']; $to = "sample@gmail.com"; $subject = "sample"; $message = "sample"; $from = "$email"; $headers = "Content-type:text;charset=utf-8" . "\r\n"; $headers .= "From: $from" . "\r\n"; mail($to,$subject,$message,$headers); }" My question is "can the code I used cause any security problem that someone be able to create a php file in my images folder or someone has accessed my account?" Thank you in advance I'm really in a big trouble Ok, so I want to make a comment spam filter for my site. I know the basic logic, but have yet to figure out how to write the functions. I have a database table called comments that has a column called "time", which contains a unix timestamp value of when it was posted. Basically what I want to do is this: When a user tries to post a comment, the script determines with a database query if they have posted a comment in the last 120 seconds. So basically I have to find the current time, and the time it was 120 seconds before the current time. Then I have to find any comments posted by the user that were made after the 120 second mark. My database query should then look something like this, right? Code: [Select] $query = mysql_query("SELECT * FROM comments WHERE author = ".$_SESSION['id']." AND time > '".$120secondsago"'"); Please correct me if my logic is wrong, which it very well may be, but how would I find the unix timestamp code from 120 seconds before the current time? Note that 120 seconds is just an example and also that I have not worked with dates in mysql very often. $query = mysql_query("SELECT * FROM comments WHERE author = ".$_SESSION['id']." AND time i am using mail functions in php and i am sending mails but the mails are going to spam in gmail and for yahoo its going to inbox. my problem is i want to send the email to inbox only as most of them use gmail ....should i use any smtp or any other mail library functions? can anyone guide me? First problem fixed. My second problem is if the result is 0X.XX,0 or 0X.XX,1 I would like to remove the first 0 The X.XX are numbers, but the 0 is not always there. Can anyone help please Thanks HI, i have a problem, a big one. I used a php script to send some info from my html forms to my gmail. So it functions easy, somebody fills out the form and he click send, after that, his information is sent to me on my gmail, and i can work with it later. Now stupid google have some new filters (from year 2014 ) and it treats some of those mails as spam. Code is written in the way that allows me to get those mails as it is sent from the user himself, from his email. Can anybody correct my script so it won't be treated as a spam, because i know it is possible but don't know how... here is the code - https://gist.github....67145d500c5cf47 // Receiving variables Hello everyone, I have website that uses the php(mail) function to notify users when something happens on their account. The site was created for a school district so all the users are district employees where their incoming email is subject to pretty strict spam filtering. I am using headers to indicate to the recipient that the email is coming from support@mysite.com, but I guess the mail servers see past this and recognize that it's coming from a php(mail) function. Because of this, all of the emails being sent are being blocked by the filter. I've tried adding all emails coming from an address that ends with "@mysite.com" but this doesn't work. This is what the addresses look like that the spam filter is actually seeing: elmas156@p3nlhftpg049.shr.prod.phx3.secureserver.net And I can't just add a single address to the white list because each time an email is sent, the letters and numbers after "@" and before "secureserver.net" are different. Here's another address that shows up: elmas156@p3nlhg331.shr.prod.phx3.secureserver.net here is the code that I'm using to send the emails: Code: [Select] <?php $sendto = "$email"; $emailsubject = "Testing Message Report For $cdate."; $emailmessage = "This is a test email."; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'From: MySite.com Report <support@mysite.com>' . "\r\n"; // Mail it mail($sendto, $emailsubject, $emailmessage, $headers); ?> Does anyone have any suggestions on what to do to make every email sent to be recognized by the spam filter as coming from the same email instead of a bunch of random ones? I hope this is making sense to someone because it was very difficult for me to explain in writing. Thanks in advance for any help or suggestions. Hello there! I made a contact-form with PHP but the e-mails go directly into the spam folder. Then I ran a test on http://www.mail-tester.com and I got some errors. As you can tell, I am new to PHP and I don't know what to do. I appreciate any help! Errors: 1. HTML_MIME_NO_HTML_TAG HTML-only message, but there is no HTML tag 2. MIME_HTML_ONLY Message only has text/html MIME parts 3. MISSING_DATE Missing Date: header 4. "Your message is not signed by DKIM" 5. "There is no SPF record. Please add (number).easyname.com to your DNS zone file."
Here is my PHP: <?php $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; $from = 'From: mywebsite.com'; $to = 'someone@something.net'; $subject = 'Subject-line'; $body = "From: $name\n E-Mail: $email\n Message:\n $message"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html\r\n"; $headers .= 'From: '. $email. "\r\n" . $headers .= "Reply-To: ". $email. "\r\n"; $headers .= "X-Mailer: PHP/" . phpversion(); $message = nl2br($message); $status = mail($to, $subject, $message, $headers); if($status) { echo '<p>Your Message has been send!</p>'; } else { echo '<p>Something went wrong. Please try again.</p>'; } ?> Here is my HTML: <div class="contact-form"> <form id="contact-form" method="post" action="contact-form-handler.php"> <input name="name" type="text" class="form-control" placeholder="Your Name" required> <br> <input name="email" type="email" class="form-control" placeholder="Your Email"> <br> <textarea name="message" class="form-control" placeholder="Message" rows="40" required></textarea><br> <input type="submit" class="form-control" value="SEND MESSAGE"> </form> </div>
I tried many things but nothing really worked. Also, I am a noob at PHP so I am kind of lost. Thanks for your help! |