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 #171296 is a reply to message #171251] Thu, 30 December 2010 03:35 Go to previous messageGo to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
On Wed, 29 Dec 2010 13:08:35 -0800 (PST), Captain Paralytic wrote:

> 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")

See what I mean? Bashed for a minor spelling mistake.
[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: Sat Nov 30 11:48:26 GMT 2024

Total time taken to generate the page: 0.04514 seconds