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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:31:52+00:00 2026-05-24T00:31:52+00:00

I have written a php code which will get one id from database and

  • 0

I have written a php code which will get one id from database and using that id it will use some API’s provided by other websites and generate a page.

here my question is where this generated page will occupy the space on the server or on the client machine?

if 10000 people will open the same page then will my server be slow down in this case.

should i store all data for that API in our MySQL-database.

what will make it fast & safe…

Please suggest me…

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-24T00:31:53+00:00Added an answer on May 24, 2026 at 12:31 am

    I have written a php code which will get one id from database and
    using that id it will use some API’s provided by other websites and
    generate a page.
    here my question is where this generated page will occupy the space on
    the server or on the client machine?

    The generated page will occur on the client if you only fetch one id from your database. For this you could first do a jquery.get to fetch id from your server. Next you could get data from other API’s using JSONP(JSON with padding). But for this to work the API’s off course need to support JSONP, because the javascript clients can’t fetch data using jquery.get because of same origin policy, but lucky JSONP can be used for that. Finally you could just easily append data to the DOM using .html. You should be carefull doing this with other API’s and need to be sure these are safe API’s because else you would be vulnerable to XSS. If you are not certain you should use .text instead.

    should i store all data for that API in our MySQL-database.

    It depends if the API’s do provide JSONP.

    what will make it fast & safe…

    Fast

    1. APC to cache compiled bytecode. This will speed up your website tremendously without even changing a single line in your code-base.
    2. in memory database as redis or memcached. You can also use APC to store data in memory. This will speed up your website tremendously, because touching the disc(spinning the disc to right sector, etc) is very expensive and using memory is very fast.
    3. The No-Framework approach will make your site fast, because PHP is dynamic language you should try to do as little as possible.
    4. Tackle low hanging fruit only. Remember that “Premature optimization is the root of all evil”. Rasmus Lerdorf teaches you how to do this in this video Simple is Hard from DrupalCon 2008. The slides are available at PHP’s talks section

    Safe

    1. Read up OWASP top 10
    2. Protect against XSS using filter
    3. Protect against SQL-injection using PDO(prepared statements).
    4. Protect against CSRF
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code I've written in PHP for consuming our simple webservice, which
I have inherited some legacy PHP code what was written back when it was
I have a code snippet written in PHP that pulls a block of text
I have written a web app in PHP which makes use of Ajax requests
I have some old apps written in PHP that I'm thinking of converting to
I have a SQL database which i use to store some info and every
I have written jQuery code, in files Main.html and ajax.php . The ajax.php file
I have a prototype website written in PHP. Lately i've rewritten code to separate
I have a small AJAX application, written in PHP that I did not secure
I have written an AIR Application that downloads videos and documents from a server.

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.