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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:08:45+00:00 2026-05-30T19:08:45+00:00

I’m creating a php website in which I have a document.php that basically takes

  • 0

I’m creating a php website in which I have a document.php that basically takes a did (document ID) and displays it. An example would be mysite.com/document.php?did=1 which grabs the document content from database with a query like SELECT * FROM documents WHERE id=1. I know the security issues with this approach (such as SQL Injection) and I both do both validation and escaping but one thing that some guy told me was that it can be pretty easy to create a crawler that does something like:

for(int i = 0; i < 3000; ++i) 
   DownloadPage("mysite.com/document.php?did="+i);

Now I have 2 questions.

  1. Is this really an issue with the code that I’ve written or is there another solution for this? For instance, I know that I can tell Apache server to limit the bandwidth usage for one IP. (Or maybe a better alternative presented by you.)
  2. If this is an issue, I have a solution in my mind. I think I should add another parameter to the page. Something like the hash for the content which will be checked against the DB to see if this is the correct URL.

One thing that I’ve seen around a lot is that sometimes some part of the title is appended to the URL. Something like this:
mysite.com/document/1/some_part_of_the_url but I’ve checked and if I remove the title and go to mysite.com/document/1 it will still show the same webpage. This made me think that this is not for security reasons and is more like a way to help the user find out what is the title of the page he’s going to.

  • 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-30T19:08:46+00:00Added an answer on May 30, 2026 at 7:08 pm

    The reason that the title is generally appended to the URL is for search engine optimisation.

    Are the documents supposed to be secure? If so, you need to implement some kind of authentication. Security by obscurity e.g. the user won’t guess the ID is not a good way to do it. You could quite easily implement a username/password, even if the username/password is baked into the code, and then use sessions to check the user is authenticated.

    If the documents are not secured then I don’t really see any need to worry about authentication. Consider that on SO you could access questions by just going to stackoverflow.com/questions/#{id}.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to count the length of a string with PHP. The string
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I'm trying to create an if statement in PHP that prevents a single post
I would like to run a str_replace or preg_replace which looks for certain words
link Im having trouble converting the html entites into html characters, (&# 8217;) i

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.