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 6022299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:50:19+00:00 2026-05-23T03:50:19+00:00

I have various sections on my website, such as a blog, forum, wiki etc

  • 0

I have various sections on my website, such as a blog, forum, wiki etc and I’d like to develop an API to encompass all these sections, and allow users to pull information from any section.

Users should also be able to pull information (such as latest posts) from multiple sections at once and return the results. The API should be very modular, so as to allow new sections to be added easily if, for example, another blog is added.

I’m just looking for a point in the right direction for developing something like this.

Thanks.

  • 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-23T03:50:20+00:00Added an answer on May 23, 2026 at 3:50 am

    For content sites, an actual API is rarely necessary, unless you want to allow users and clients to post to your site.

    What you actually need to do is just to separate logic from presentation.

    Per example:

    $articles = $pdo->query('SELECT * FROM articles')->fetchAll();
    
    if (isset($_GET['type'])) {
        switch ($_GET['type']) {
            case 'json':
                header('Content-Type: application/json');
                echo json_encode($articles);
                break;
            case 'xml':
                header('Content-Type: text/xml');
                // some array to XML function
                break;
        }
    } else {
        include 'my_html_template.phtml';
    }
    

    Of course, this is a very basic example. But once you’ve separated your presentation from your logic, you can easily create templates in a multitude of different formats, which can be parsed using different tools (JSON encoder, XML parser, etc.) by different clients (mobile application, aggregator service, third-party application, etc.).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Javascript I have code that will hide various sections in a MS CRM form
I have various time-series I'd like to correlate and present as either a csv-file
I have various models of which I would like to keep track and collect
i have various strings that look like that: $(gateway.jms.jndi.ic.url,0,tibjmsnaming, tcp)/topic/$(gateway.destination.prefix)$(gateway.StatusTopicName),$(gateway.jms.jndi.ic.username),$(gateway.jms.jndi.ic.password),abinding,tBinding i'm trying to figure
I have various sections within a page of content that dynamically get replaced based
I have a sidebar and the various sections on a page. The sidebar floats
So I have a div tag to sort of draw boxes around various sections,
Lets say I have a website with links to various books on my main
I have various class which perform save and update operations of GUI elements, it
I have various settings in my ccnet.config file and wish to pass them to

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.