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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:14:27+00:00 2026-05-31T04:14:27+00:00

I am trying to develop an application on android. The application is basically send

  • 0

I am trying to develop an application on android. The application is basically send the user’s location information with the users it specified for a finite amount of time. It will be like Glympse.

I am doing this for a school project so don’t have good hosts for the web. I am trying to use free ones. And i can not use their database systems to my own wishes. and inserting and fetching from the database continously will be a burden.

One other option coming to my mind, is to open up php page when the user wants to share hislocation. This page will continously communicate with the gps information. But as this pages should be specific to some people, they must have unique, unpredictable url. like the ones when have password recovery mails. Also i wonder how to make this pages exists for some time and disappears.

The page links will be sent to the shared users lately.

  • 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-31T04:14:29+00:00Added an answer on May 31, 2026 at 4:14 am

    So what about storing any of the URI data is a session array and when a specific key is requested by the user use the received key and replace it by your actual URI stored in the $_SESSION array?
    when generating a uri you could have a method store it for you and return a replacing URI
    like so (note that you should have session already started that should not be part of this objects scope):

    class URIStore{
        private $URIstoreID;
        private $SUPERSECRETSALT;
        private $storeName;
    
        const STORE_EXCEPTION_EXPIRED = 0;
        const STORE_EXCEPTION_CSRF = 1;
    
        public function __construct($storename){
            //retreive existing store ID so we can built on previous
            $this->URIstoreID = isset($_SESSION[$storename]['URIStoreID']) ? $_SESSION[$storename]['URIStoreID'] : 0;
            $this->SUPERSECRETSALT = 'jsf098u32rojwe092';//salt could be made random here
            $this->storename = $storename;
        }
    
        /**
         * stored the $uri data in a session for later retrieval through the returned key
         * @param mixed $uri - can be anything that you want, like a key value pair array
         * @return string
         */
        public function store($uri){
            $r = md5($this->URIStoreID.$this->SUPERSECRETSALT);
            $_SESSION[$this->storename][$r] = $uri;
            $this->URIStoreID++;
            $_SESSION[$this->storename]['URIStoreID'] = $this->URIStoreID;
            return $r;
        }
    
        /**
         * returns a previously stored URI item
         * @param string $key - the key you want to get the URI data for
         * @return mixed
         * @Throws Exception - when Store or Key doesnt exist
         */
        public function retrieve($key){
            if(!isset($_SESSION[$this->storename]){
                //the initial session has expired
                throw new Exception("URIStore [$this->storename] does not exists",self::STORE_EXCEPTION_EXPIRED);
            }
            elseif(!isset($_SESSION[$this->storename][$key]){
                //the requested key does not exist
                //could be CSRF attempt?
                throw new Exception("URIStore [$this->storename] does not contain this key",self::STORE_EXCEPTION_CSRF);
            }
            return $_SESSION[$this->storename][$key];
        }
    }
    

    the use the above you could do the following when building a URL

    $store = new URIStore('URIStore');
    $URL = SERVER_URL . 'yourscriptthathandlestherequest.php?key=' . $store->store(array('a'=>1,'b'=>23));
    

    and when you retrieve a request you first get the actual data instead of get data
    like

    $store = new URIStore('URIStore');
    try{
        $data = $store->retrieve(@$_GET['key']);
    }
    catch(Exception $e){
        switch($e->getCode()){
            case URIStore::STORE_EXCEPTION_EXPIRED:
                 //handle accordingly
                 break;
            case URIStore::STORE_EXCEPTION_CSRF:
                 //handle accordingly
                 break;
        }
    }
    

    note that in your case GET is fine, for CRUD actions I would highly suggest using POST

    the Session will expire when no requests are made for a while (depends on server settings)
    if you want different expirations for different items (still limited to the session expiration time as a maximum though) you would add another layer to the array that stores the uri and an additional timestamp that you have the URIStore::retrieve method compair against. and finally you could use multiple stores for different things if you wanted. so that you only use the one you expect on a certain page.

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

Sidebar

Related Questions

I am trying to develop an application in android in which users will be
I am trying to develop an android application that will stream the video from
I am trying to develop an android application which will retrieve a voicemail message
I am trying to develop an android application that will use Bluetooth capabilities to
I am trying to develop an android application that will use the same MySQL
I'm trying to develop an application that will use getImageData in javascript in Firefox
I'm currently trying to develop an android application in eclipse(java) which shows some jokes
We are trying to develop an application that send messages to a service, but
I'm trying to develop an application where in the people will get notified if
I'm trying to develop an application launcher application for android. I'm in the very

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.