Extract site information using php

Discussion in 'PHP' started by samirkumardas, Aug 2, 2008.

  1. #1
    Is there any script or resource to extract site information (Site title, a short description, and fews images if available) from a url using php?

    I want just a function like facebook when you submit a link in facebook?

    Any help?
     
    samirkumardas, Aug 2, 2008 IP
  2. Joseph S

    Joseph S Well-Known Member

    Messages:
    1,373
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    155
    #2
    I can code this for you. PM me if you are interested.
     
    Joseph S, Aug 2, 2008 IP
    Abhik likes this.
  3. lovelycesar

    lovelycesar Peon

    Messages:
    145
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you can try php function file_get_contents(url) ?
     
    lovelycesar, Aug 3, 2008 IP
  4. M.Zeb Khan

    M.Zeb Khan Peon

    Messages:
    104
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    $html = implode('', file('http://www.example.com/'));

    Thats the way to go
     
    M.Zeb Khan, Aug 3, 2008 IP
  5. ukshopping

    ukshopping Peon

    Messages:
    80
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    To get meta descritption & tags, use PHP's 'get_meta_tags' function. For title, content & images you can use regex
     
    ukshopping, Aug 3, 2008 IP