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 #171326 is a reply to message #171296] Thu, 30 December 2010 11:25 Go to previous messageGo to previous message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma:
Senior Member
On Dec 30, 3:35 am, richard <mem...@newsguy.com> wrote:
> 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.

Bashed?
In programming syntax and semantics are extremely important. I merely
pointed out an error to help him get things right in the future.

Most people learn by their mistakes, but they can only do so if they
are informed that a mistake was made in the first place.

You are an exception, you just keep on making mistakes...
[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: Fri Oct 04 23:22:20 GMT 2024

Total time taken to generate the page: 0.05167 seconds