CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 2009
    Posts
    160

    robot to read html from other websites

    would like to know if there is a way for me to write a php script that would behave like a robot and read html content from other websites. Lets say i was selling something and i wanted to know what my competitors are pricing their products at.... is there a possiblity to write a php script that would help me do that.

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: robot to read html from other websites

    Very simple. The only thing you would need to do to keep it active is to set it to run as a scheduled task/cron job.

    EDIT: You already know how to read files, right? I'm assuming that you've at least gotten that far in PHP.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    May 2009
    Posts
    160

    Re: robot to read html from other websites

    Quote Originally Posted by PeejAvery View Post
    Very simple. The only thing you would need to do to keep it active is to set it to run as a scheduled task/cron job.
    Yes i do know about cron jobs but how would i write a script to go in and read another site's html content? I have no clue on how to do this and i did google it but i guess i wasn't using the right words to get me to something interesting and helpful.

  4. #4
    Join Date
    May 2009
    Posts
    160

    Re: robot to read html from other websites

    Quote Originally Posted by PeejAvery View Post
    Very simple. The only thing you would need to do to keep it active is to set it to run as a scheduled task/cron job.

    EDIT: You already know how to read files, right? I'm assuming that you've at least gotten that far in PHP.
    yes i do know how to read files, but would that be the same as reading a webpage as well?

  5. #5
    Join Date
    May 2002
    Posts
    10,943

    Re: robot to read html from other websites

    The reading of the file would be the exact same. Parsing would just have to be done using regular expressions to match specific X/HTML tags.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  6. #6
    Join Date
    May 2009
    Posts
    160

    Re: robot to read html from other websites

    Quote Originally Posted by PeejAvery View Post
    The reading of the file would be the exact same. Parsing would just have to be done using regular expressions to match specific X/HTML tags.
    oh i never thought it would be that easy... i am going to try out a few things and will post if i get into trouble which most probably i will. tx.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured