Remove Skip or Prevent Image showing from RSS feed

Discussion in 'PHP' started by Yusha, Dec 5, 2010.

  1. #1
    How can I remove or skip or prevent an image to show on my page when I am getting rss data.. I have stopped the Image showing but the URL of that Image still showing as plain text..

    here is the code that I have used to generate data..

    
    
    
    // Parse IMAGE info
                            preg_match("'<image.*?>(.*?)</image>'si", $rss_content, $out_imageinfo);
                            if (isset($out_imageinfo[1])) {
                                    foreach($this->imagetags as $imagetag) {
                                            $temp = $this->my_preg_match("'<$imagetag.*?>(.*?)</$imagetag>'si", $out_imageinfo[1]);
                                            if ($temp != '') $result['image_'.$imagetag] = $temp; // Set only if not empty
                                    }
                            }
    
    
    
    
    
    PHP:





    Please help me out.
     
    Yusha, Dec 5, 2010 IP
  2. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #2
    preg_replace()
    PHP:
    Something like
    $rss_content = preg_replace('#<image.*?>(.*?)</image>#U', '', $rss_content)
    PHP:
    Please supply us a link for a better example if the above doesn't work.
     
    Last edited: Dec 6, 2010
    MyVodaFone, Dec 6, 2010 IP
  3. Yusha

    Yusha Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Problem solved.. I have done that like 20 hrs ago... any way thanks for help...
     
    Yusha, Dec 6, 2010 IP