Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Code for remove iframe from all the pages
Old 07-10-2009, 04:34 AM Code for remove iframe from all the pages
Average Talker

Posts: 17
Name: Biju
Trades: 0
Guys,

Some of websites affected with malicious virus HTML-iframe. I removed it servral times but its coming back.

Is there any code available to remove all the HTML-iframe from my sites??
I have website which have more than 45000 pages.

I like to remove all the iframe code online(through FTP) execute a php file.
plz help me in this matter.


Thx
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
sherone is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-10-2009, 01:53 PM Re: Code for remove iframe from all the pages
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
You'd be better off using a site-wide search and replace, then re-uploading all of the affected files. 45000 pages?? Yikes... this is why it is better to generate large sites dynamically.

Before you do anything you had better talk to your host to see if they can give you a clue as to where the invasion is coming from. Likely it's from another site on the same server as yours, and you have some bad permissions on the files that is allowing the malicious neighboring site to write to your files. This is a very common way in which sites are hacked.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 07-10-2009, 07:47 PM Re: Code for remove iframe from all the pages
Junior Talker

Posts: 3
Name: Stephan
Trades: 0
Are the pages written in Php? Because then you can replace the iframes dynamically with a replacement script.

Step 1: Make an class inside your .css called seenolink with specs like fontsize='1px'; color=white;
Step 2: Place the followingcode inside your page

Search and destroy!

<?
$iframe = "Name of the data output!";
$iframe = str_replace("<iframe","<a href='#' class='seenolink'",$iframe);
$iframe = str_replace("src=","",$iframe);
$iframe = str_replace("</iframe>","</a>",$iframe);

?>

If your page is not in php you can also use an similair code for .asp!

Greatz, By Stephan from Holland!
skcdesign is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Code for remove iframe from all the pages
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.54139 seconds with 12 queries