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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:26:56+00:00 2026-05-15T03:26:56+00:00

I want to make a news portal(php) with minimum mysql force. :create a cron,

  • 0

I want to make a news portal(php) with minimum mysql force.
:create a cron, fetch data from mysql and write to a php file . (I dont know is it right way)
But Can I use xml instead of php file? Write mysql data to xml.
Is this a secure way? What is the best way? XML or php file?

alt text http://img541.imageshack.us/img541/4784/87392425.gif

Thanks in advance

  • 1 1 Answer
  • 1 View
  • 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-15T03:26:57+00:00Added an answer on May 15, 2026 at 3:26 am

    Let me start of by saying that MySQL is very fast and very secure. I recommend building the pages with MySQL upon request, most web applications do this because its a very good approach. To save resources you can cache the output using a Squid Reverse Proxy, and it is very common to see this on high traffic sites. PHP’s APC will also reduce resource consumption without sacrificing secuirty. Smarty’s Caching system is also a good approach with minimal security impact.

    There are secuirty concerns regardless of what method you choose, but some approaches more hazardous than others. For instance creating .php files with user input is probably the most dangerous thing you can attempt to do with a php web app.

    $page='$title="'.$_GET['user_title'].'"';
    file_put_contents("/var/www/page.php",$page);
    

    An attack against this code would look like this:

    http://localhost/page_creater.php?user_title='; eval($_GET[backdoor]); /*
    

    Creating XML files with user input is also dangerous because it opens the door for Advanced LFI Attacks. However, the counter argument is that as long as your application is free from Local File Include vulnerabilities, then you shouldn’t have to worry. But this is not a “Defense in-depth” design, because you should plan on failure.

    Its possible to implement something like Squid’s reverse proxy in php using ob_start(), however your still creating files with attacker controlled data, and that is hazardous. Also don’t include() .html files that’s incredibly stupid (See advanced LFI attacks…), a better approach is this: print(file_get_contents($file)). I do like using .html files over using .xml files because html doesn’t have to be processed before outputting it to the user. Using xml files as a data storage is wasteful of resources when compared to MySQL.

    (Disclaimer: Vulnerabilities have been found in Smarty and squid, and php, and linux, and mysql and apache and…. everything else, even StackOverflow 😉

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

Sidebar

Related Questions

I want to make a simple news system using PHP and MySQL, right now
i want to make an news bar, by selecting mysql data and display it
i want make a news site gets its content from other news sites, open
I am generating a news section with php and I want to make continue
I want to make a tech news website. I started learning PHP, and since
I want to create a portal website for log-in, news and user management. And
I want to make a code to extract the main news from a news
So I want to make a HTML news letter to be sent out. I
I am doing a news reader app and I want to make it so
I want make a bash script which returns the position of an element from

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.