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
Re: Fetching an external web page [message #171251 is a reply to message #171231] Wed, 29 December 2010 21:08 Go to previous messageGo to previous message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma:
Senior Member
On Dec 29, 7:09 pm, Mike <mpea...@gmail.com> wrote:
> 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

use curl (and it's "its" not "it's")
[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: Wed Nov 27 06:09:48 GMT 2024

Total time taken to generate the page: 0.05295 seconds