PHP Script to check if external page contains a certain html tag

Posted on 2011-04-29
Last Modified: 2012-05-11
How would I go about getting a PHP script to check an external site's page x for html tag x and return that data on the same server where the script is activated?  So I mean
user enters target url
script checsk that url's home page in  background for tag x
Returns that tag plus content between opening and closing tag to page b (result page) on the same server.
Are there scripts for that out there? Any advice on how to build one?
Question by:rhandalthor
    LVL 36

    Accepted Solution

    You can check with cURL, ref. example
    LVL 2

    Expert Comment

         $weather_feed = file_get_contents("");

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
    This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now