All posts in category Web Development

Found the spam code

I had a problem with a Spam code inserted on my website, when i check the code i didn’t find anything but i see it when i use google crawl index ( from my Google webmaster )

How to solve that

You have first to change the password of the FTP access and the admin access for WordPress, that is so important , then scan your PC with a good antivirus ( if you are using windows ) .

After that you have to check your plugin ( in my case that was the problem ), i installed many plugins that got that spammy code in it, so i removed them .

To check that there is no problem with your text of the website, you can check your website with google crawl index ( image on left )

and then after submitting the website, you will find a link for a success , press on it you will redirected to the indexed page

This is very useful to see your website as google see it .

Final thought

I have to explain the spam text inserted in my website, the spam text was like the following message and i removed it by removing the plugin infected ( this is the case happened with me ) , if that could help any one somehow.

May be you had a situation that you wanted to send a mail from your form using SMTP not the regular mail() function, in my case i had to use smtp to send mails as my emails delay getting mail from the regular mail() function and sometimes the mail doesn’t reach the receipt

I used PHPMailer to do that, it’s easy to setup and solve this problem .

Firstly you have to upload the folder to your host and create a file with any name ( in my case called mail.php ) and insert the following code in it .

you have to include the path to PHPMailerAutoload.php path in the script

If you have table based design that needed to be edited to be div based, you have to change remove all the table, tr, td from the page
to do that and the fatest way for that you have to use regualar expressions

I used notepad++ ( find and replace ) :

to remove all the tables divs (<table[^>]*>) and replace with (nothing) and do that with the ( tr ) and ( td ) , also you have to change the styling for the html again .

to know more about regular expressions in notepad++ , refer to the following links :