How to create myown map with gps loction track [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I would like to create a web application that people can use for to locate them self with GPS tracking.
criteria:
I have to use my own map for a particular location
It is a web application that will work with all new generation browsers mainly for mobiles
and tablets
whenever I am moving one place to other the pointer should change the location according
the place in map.
is it possible to create in a web application?

With HTML5 you can do it, see this example Get user location within Google Map
To get updates for user location, you should implement watchPosition function in your JavaScript code too.
At first time, with getCurrentPosition function, you will get an aproximate user location, if you need more accuracy, you should implemente watchPosition
By calling this method as soon as your app starts, the GPS hardware will activate immediately and keep running, and it’ll fire callbacks whenever the device’s location has changed.
Read more here HTML5 Geolocation: Improving GPS Accuracy

Related

Get the source code of a web page after it has been modified by jquery in php [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
here is an example, say every item in each list was clicked on http://katproxy.com/the-big-bang-theory-tv8511/, how would you proceed to get the source code of the modified web page using php considering the fact that the url has not changed (file_get_contents is probably out of the question).
Thank you!
Using PHP? You can't, not without fetching the page source and evaluating its JavaScript, which is obviously quite impractical.
The "page" hasn't change, only your in-browser representation of the DOM has been modified. You would need PHP to talk to your browser, and ask for the state of its DOM, not the remote server, which cannot possibly serve up the HTML representation of your browser's current DOM.

PHP,Linux,Apache: naming file based on user input [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
whats up guys?
so my question is simple: my application receives the name of the file as a $_POST['fieldname'] from user and then create the file in a folder on server, or in another case using the $_POST['fieldname'] return the path of the file if file exists. so, is it safe?!
thank you guys!
The answer is that it depends on how well you set up the security around your filesystem access and how you serve the files. If you are only allowing them to send information to a particular folder and you're sanitizing the input, you could be fine. Here's more info on basic filesystem security from php.net. However you want to make sure they can't php code in files and execute them directly. A good bet there would be to not allow any execution from that folder using .htaccess.
However, as the top comment on that php.net link says, you should really consider not letting your users name files, and you should think about trying to store as much in a database as possible.

Display local users using PHP [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am developing a PHP website. My requirement is that when a visitor/user visits my website ; ie, on the home/index page I would like to list all registered users who belong to the same location as the website visitor's. For example if the visitor is from a city X in Kolkata, then list all other registered users from X. How can I implement this feature? Is there any PHP function or like that to find the geolocation. I tried HTML5 geolocation. But it didn't worked?
This problem can not be solved exactly in common case. Algorithm is that: use geoip database and client's IP-address to get approximate location. Then, using same geoip-database, select similar IP ranges and, finally, search through other users using selected IP ranges. But remember, that users in most cases are behind NAT's, so this solution will be approximate. But you can ask your users when they are registering - about their location. The method I've described before can be used either for registered and unregistered visitors.
Using any geolocation API will be most efficient for this requirement.

Parsing data from external website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
What I'm trying to do is parse a data table from this link and similar links on the site.
Basically it shows the water levels in different parts of Ontario. I want to get the data table and make my own graph.
Can someone point me in a direction to do this?
Is it possible to do without PHP?
Target link
Is it possible to do without PHP? Absolutely!
I suggest using Yahoo! Query Language (YQL).
What is YQL?
The Yahoo! Query Language is an expressive SQL-like language that lets
you query, filter, and join data across Web services. With YQL, apps
run faster with fewer lines of code and a smaller network footprint.
-- YQL Homepage
Just take a look at YQL Console, there's some nice examples at the bottom of the right panel which titled by DATA TABLES.
Another thing that makes me feel is the awesome THE REST QUERY feature.
You can use this API to get access to the query result in XML or JSON format.
There's also a full documented user guide you can use to find your answers.
Just give it a try, and I promise you will ♥ that.

How can I use PHP to take raw POST data and save to a file? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm working with an interface standard for exchanging information about the planned, current or projected performance of real-time public transport operations between different computer systems. This standard is called SIRI.
To cut a long story short, I've made a subscription with a service that sends me XML data through this interface every 30 seconds. From what I've highlighted in the red box below, it states that HTTP is used to send this data which is what I would have preferred.
I need to create a PHP file that can listen for this HTTP data and then save it to a file (overwriting the previous file every 30 seconds).
I've done some preliminary research into how I can go about doing this and I've done a little reading on:
$HTTP_RAW_POST_DATA
and
php://input
How can I come up with a PHP solution for doing this with one of these methods or a better one?
All that really needs to be done is:
file_put_contents("outputfile.txt", file_get_contents("php://input"));
Apache will deal with managing the incoming requests.

Categories