What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [php] Get Meta Data From Page

[php] Get Meta Data From Page
Author: Message:
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: [php] Get Meta Data From Page
The CURL library isn't part of the standard PHP install as far as I know...

Why don't use file_get_contents? I don't know servers that have disabled the fopen wrappers....

Otherwise you can use:

code:
function get_page($host, $path, $get) {
   
   $out = "GET /$path HTTP/1.1\r\nHost: $host\r\nConnection: Close\r\n\r\n";
   
   $fp = fsockopen($host, 80, $errno, $errstr, 30);
   $in = "";
   
   fwrite($fp, $out);
   $body = false;
   while (!feof($fp)) {
       $s = fgets($fp, 1024);
       if ( $body )
           $in .= $s;
       if ( $s == "\r\n" )
           $body = true;
   }
   
   fclose($fp);
   
   return $in;
}

This post was edited on 10-15-2005 at 06:52 PM by J-Thread.
10-15-2005 06:51 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[php] Get Meta Data From Page - by philo23 on 10-15-2005 at 03:14 PM
RE: [php] Get Meta Data From Page - by -dt- on 10-15-2005 at 03:42 PM
RE: [php] Get Meta Data From Page - by philo23 on 10-15-2005 at 03:59 PM
RE: [php] Get Meta Data From Page - by -dt- on 10-15-2005 at 04:40 PM
RE: [php] Get Meta Data From Page - by philo23 on 10-15-2005 at 04:42 PM
RE: [php] Get Meta Data From Page - by J-Thread on 10-15-2005 at 06:51 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On