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:
philo23
Junior Member
**

Avatar
PHP Mad Head

Posts: 18
33 / Male / –
Joined: Oct 2005
O.P. RE: [php] Get Meta Data From Page
code:
$filename = $url;
            $handle = fopen($filename, "r");
            $contents = fread($handle, filesize($filename));
            fclose($handle);
            if (preg_match('<link (?:[^\>]*)href="(.+)">', $content)) {
                $i=0;
                $rss = array();
                while (preg_match('<link (?:[^\>]*)href="(.+)">', $content)) {
                    $url = explode('<link (?:[^\>]*)href=', $content);
                    $rss[$i] = $url[0];
                    $i++;
                }
                $amount = count($rss);
                $i=0;
                while ($amount > $i) {
                    $rssquery = "INSERT INTO rss_link (id, site_id, url) VALUES ('', '$site_id', '$rss[$i]')";
                    mysql_query($rssquery);
                }
            }

I Am Guessing, this is straight off the top of my head, This Might Work If $url = The Url Of The Page I Am "indexing"?
10-15-2005 03:59 PM
Profile E-Mail PM Web 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