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

  • Home
  • SEARCH
  • 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 6350817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:53:01+00:00 2026-05-24T21:53:01+00:00

i am implementing a PHP application, i am using AJAX heavily in forms to

  • 0

i am implementing a PHP application, i am using AJAX heavily in forms to send and retrieve values. the typical jQuery function i am implementing is

(function($){
$.fn.saveCountry = function(destinationUrl) {
    this.click(function(){
        var formData = $('form').serialize();
        $.ajax({
            type: 'POST',
            url:  'path/to/files/models/directory/process.php',
            data: 'option=savecountry&'+formData,
            success: function(msg){
                if(msg === 'empty') {
                    alert('Required Values Missing');
                } else if(msg == 'DR'){
                    alert('Duplicate Entry Found');
                } else {
                    destinationUrl(msg);
                }
            }
        });
    });
}
}($));

the problem with the above function is it exposes the application structure of my application for example. the object url: 'path/to/files/models/directory/process.php', reveals the information about the directory structure i am using. this is a kind of threat as anyone with the access to console will be able to monitor what is happening with the request and could misuse it. is there anyway i could hide this data from the outside world?

thank you.

  • 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-24T21:53:04+00:00Added an answer on May 24, 2026 at 9:53 pm

    Ultimately no.

    The user will always be able to find out the URL of the ajax request if they wish to.

    It can be as simple as opening up firebug and watching the requests that are made.

    What I’d sugest is some kind of URL abstration such as URL Rewriting in order to hide the physical structure of your file system. This way you’ll not have that specific concern about people seeing your URLs.

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

Sidebar

Related Questions

I'm implementing object caching in a PHP application using APC. The issue is, that
I am implementing language files for my PHP application. I am using constants to
I am implementing web services for a PHP application and am trying to understand
implementing publishActivity in PHP using the REST API using this code: $activity = array(
I'm busy implementing the wurfl api using PHP, but somehow just can't seem to
I have an application using Jquery's UI Tabs for an overall menu, and they're
Possible Duplicate: Count elements for objects implementing ArrayAccess using count()? In PHP 5, you
Should I spend time implementing LDAP for authentication in my web application(php)? Is it
I want to create an application in PHP implementing virtual directory feature. Example: http://mydomain.com/user001
I am implementing role based access control using yii framework for the application mentioned

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.