Results 1 to 6 of 6

Thread: Curl getting html tags

  1. #1
    Join Date
    Sep 2008
    Beans
    70

    Curl getting html tags

    I am making a script in which i wana use curl to download a web page and check status.But problem is when i use curl in linux command line it downlaod htlm tags.How can we ignore these tage any idea.

  2. #2
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Curl getting html tags

    You just want the response headers?
    Code:
    curl -I http://example.com

  3. #3
    Join Date
    Sep 2008
    Beans
    70

    Re: Curl getting html tags

    Thanks for quick reply.

    I want to get page content to parse in my script.

  4. #4
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Curl getting html tags

    Quote Originally Posted by aliahsan81 View Post
    Thanks for quick reply.

    I want to get page content to parse in my script.
    What you get from CURL is the page content, you're getting the document returned from the server - which I assume is an HTML document, so of course it will have the HTML markup in it.

  5. #5
    Join Date
    Sep 2008
    Beans
    70

    Re: Curl getting html tags

    yes correct so there is some way i can remove these html tags

  6. #6
    Join Date
    May 2009
    Beans
    791
    Distro
    Kubuntu 9.04 Jaunty Jackalope

    Re: Curl getting html tags

    If using PHP, you can use strip_tags()..

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •