Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6799739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:53:04+00:00 2026-05-26T18:53:04+00:00

Is this facebook link populated fully from the DB? Or, is it a physical

  • 0

Is this facebook link populated fully from the DB? Or, is it a physical file with PHP in it? Just, how is this page called?
http://www.facebook.com/profile.php?id=49300915&sk=photos
They probably do something like:

if(isset($_GET['id'], $_GET['sk'])) {
    mysql_query("SELECT info, photos FROM users WHERE id = '$id'");
    }

I’m trying to ask, how do they include this page? Is it like Drupal / any CMS where the PHP and page is stored in the DB, or is it a physical file on the server? If the latter, what’s the best way to get the file (case insensitive URL)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:53:04+00:00Added an answer on May 26, 2026 at 6:53 pm

    I would have a class with a single method, which reads ‘sk’ and runs another method, depending on what it’s value is.

    One method would be ‘photos’ which would read ‘id’ and fetch a photo from the database. It would then run another method, displayPage, which will display a page from that data.

    The displayPage method takes a “template” filename and an array of variables to provide to the template. It sets up a smarty object, provides the variables, and instructs it to display the template.

    Inside the template, I’d include another template for the global header that’s on every page in the site, then i’d have the html page content, using smarty to insert dynamic values, then include a global footer.

    Note that i’ve simplified this system a lot. A real page like that would take me a week to write all the code, since a big website does a lot of stuff just to display a simple page (for example: find out if the logged in user actually has access to the page… i don’t have access to the example one you gave).

    <?php
    
    // profile.php
    
    class ProfileController
    {
      public function run()
      {
        if ($_GET['sk'] == 'photos')
          return $this->photosPage();
      }
    
      protected function photosPage()
      {
        $id = (int)$_GET['id'];
        $result = mysql_query("select * from photo where id = $id");
        $photo = mysql_fetch_object($photo);
    
        $this->displayPage('view-photo.tpl', array('photo' => $photo);
      }
    
      protected function displayPage($templateFile, $templateVariables)
      {
        $smarty = new Smarty();
    
        foreach ($templateVariables as $variableName => $variableValue) {
          $smarty->assign($variableName, $variableValue);
        }
    
        $smarty->display($templateFile);
      }
    }
    
    $conntroller = new ProfileController();
    $controller->run();
    

    And the smarty code:

    <!-- view-photo.tpl -->
    {include file='head.tpl'}
    
    <h1>View Photo {$photo->name|escape}</h1>
    
    <img src="{$photo->src|escape}" width="{$photo->width|escape} height="{$photo->height|escape}>
    
    {include file='foot.tpl'}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my code for my Facebook share link: <a href=<%= HttpUtility.UrlPathEncode(http://www.facebook.com/sharer.php?u=http://www.apoads.com+ Request.Url.PathAndQuery) %> title=Share
I have an app called static HTML (https://apps.facebook.com/static_html_plus/?ref=ts) installed on a page of mine..
I have a link with the following code. <a href=www.facebook.com>Facebook</a> I want when I
i have this facebook page: LINK And i want to implement multiple facebook like
I'm gleaning from this question [ Facebook Connect Won't Validate that using Facebook Connect
I want to add share this on Facebook to a page. I've got this
I'm trying to get just a piece of information from Facebook, but I don't
After looking I did come accross this post on the facebook forums: link They
I saw this: http://memeburn.com/2012/02/anonymous-is-shutting-down-the-internet/?utm_source=twitterfeed&utm_medium=twitter&utm_campaign=Feed%3A+memeburncom+%28memeburn%29 But I've seen it loads. The part I'm referring to
I try to post my image link to Facebook fan page using Facebook C#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.