FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Fetching an external web page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Fetching an external web page [message #171231] Wed, 29 December 2010 19:09 Go to previous message
Mike is currently offline  Mike
Messages: 18
Registered: December 2010
Karma:
Junior Member
I want to grab a web page, it's response headers and parse the whole
thing. So, I want the response headers, meta tags, and some of the
content extracted. The way I'm doing it now takes three calls to the
remote server. How can I do it with just one call?

Here's my current code:

$htmlSource = file_get_contents($this->url);
$responseHeaders = get_headers($url, 1); // Possible to combine with
get_contents?
$metaTags = get_meta_tags($url); // How could I use this with
$htmlSource?

Thanks for the help!

Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Failed to write to a text file (text file is RW)
Next Topic: PHP Bug + Hotfix
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 07 02:24:13 GMT 2024

Total time taken to generate the page: 0.04161 seconds