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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:12:34+00:00 2026-06-02T02:12:34+00:00

Supposing I want to restrict post requests in order to process only ones that

  • 0

Supposing I want to restrict post requests in order to process only ones that are coming from my own domain, how can I check for the referer other way than using $_SERVER[‘HTTP_REFERER’], which I read ($_SERVER documentation) that can not be trusted?

  • 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-06-02T02:12:36+00:00Added an answer on June 2, 2026 at 2:12 am

    This isn’t possible unfortunately, the only way to check the referrer is if the browser has supplied this information, which obviously, could be changed to benefit the reader.

    However you could create a user session or cookie that saves a variable to show that the user has visited the site. You could then only allow users to see the posts if that session variable is defined.

    Another option would be to generate links based on the users IP address and only give them access if they have clicked on a specifically generated link. You could start by saving the users IP address and a unique key in the database and then all your internal links could use a GET variable with the unique ID. If the page is opened without a genuine ID then you could display an error message.

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

Sidebar

Related Questions

In Java, supposing you want to run a task in its own heap space
Supposing a query such as: SELECT * FROM tableA; How can I prepend a_
We had a bit of a problem. :) We want to ensure that only
In order to support an API that only accepts a specific amount of items
Supposing I want to query for the XPath //*[@id=$href] . How can I tell
Supposing I have two classes, Customer and Order, where one Customer can have one-or-many
Supposing I have this: foo bar 1 and foo bar 2 How can I
Supposing that I have millions of user profiles, with hundreds of fields (name, gender,
MVC newbie question re binders. Supposing I have two strongly typed partial actions that
I have to detect port aggregation configuration on Linux. Supposing that the ifcfg-* files

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.