#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    4
    Rep Power
    0

    Help! How to access Facebook page source with php?


    Hello!

    Does anyone know how i can access Facebook page sources with php using WAMP Server? I tried the following lines but they kept bringing me to some Facebook page telling me to "Update Your Browser".

    $hey = fopen("somefacebookaddress", "r");
    while (!feof($hey))
    {
    $line = fgets($hey);
    echo $line;
    }

    However, i know its not a browser problem because i can access Facebook normally on my computer and the exact same lines work when i use an online hosting service.

    Please help me!! Thanks in advance!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,600
    Rep Power
    595
    Why would you not use Facebook's API?
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    4
    Rep Power
    0
    Originally Posted by gw1500se
    Why would you not use Facebook's API?
    I guess its because facebook this is only a small portion of something else i'm working with. But mainly its cause this should be easier for what i'm doing if it works..
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2003
    Posts
    3,600
    Rep Power
    595
    You should check Facebook's Terms of Service before proceeding.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    4
    Rep Power
    0
    Well okay. So i guess theres no solution?
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    4
    Rep Power
    0
    Right i saw the line in the tos. Thanks!

IMN logo majestic logo threadwatch logo seochat tools logo