Jump to content

[SOLVED] urgent help please


dtdetu

Recommended Posts

hello i need some urgent help i get some page content and i want to remove these links from the content but links changes everytime so i cannot find the pattern i used

$description = str_replace("<img src=\"[^<]*\" height=\"1\" width=\"1\"/>", "", "$description"); 

but didnt work can you check

 

<a href="http://feeds.searchengineland.com/~a/searchengineland?a=eO9BZj"><img src="http://feeds.searchengineland.com/~a/searchengineland?i=eO9BZj" border="0">
<a href="http://feeds.searchengineland.com/~f/searchengineland?a=60rDO"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=60rDO" border="0"> <a href="http://feeds.searchengineland.com/~f/searchengineland?a=T9iAo"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=T9iAo" border="0"> <a href="http://feeds.searchengineland.com/~f/searchengineland?a=eF5jo"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=eF5jo" border="0"> <a href="http://feeds.searchengineland.com/~f/searchengineland?a=3kPwo"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=3kPwo" border="0"> <a href="http://feeds.searchengineland.com/~f/searchengineland?a=QGv7o"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=QGv7o" border="0"> <a href="http://feeds.searchengineland.com/~f/searchengineland?a=VHeTO"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=VHeTO" border="0"> <a href="http://feeds.searchengineland.com/~f/searchengineland?a=aULMO"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=aULMO" border="0"> <a href="http://feeds.searchengineland.com/~f/searchengineland?a=VHeTO"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=VHeTO" border="0"> <a href="http://feeds.searchengineland.com/~f/searchengineland?a=W8bEo"><img src="http://feeds.searchengineland.com/~f/searchengineland?i=W8bEo" border="0">
<img src="http://feeds.searchengineland.com/~r/searchengineland/~4/478723345" height="1" width="1"/>

Link to comment
Share on other sites

<?php
$code = "<a href=\"test\">test</a>tester";
$code = preg_replace("/\<a href=([^\[]+)\>(.*?)\<\/a\>/","",$code);
$code .= '<img src="http://feeds.searchengineland.com/~r/searchengineland/~4/478232756" height="1" width="1"/>';
$code = preg_replace("/\<img src=([^\[]+)\>/","",$code);
echo $code;
?>

Prints out tester :D

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.