answersLogoWhite

0

What is the PHP code to get the location of the client?

Updated: 8/17/2019
User Avatar

Wiki User

13y ago

Best Answer

there is no code for that, however when you are familiar with the Google maps API you can send the required values to get its location.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the PHP code to get the location of the client?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a php programmer?

A person who programs in PHP, which is a server-side scripting language used as the back-end of many web applications. A PHP processor processes the PHP code before it is sent to the client so the client never sees the back-end code but only HTML and other client-side code. PHP is a fairly robust and versatile programming language which is both procedural and object-orientated in nature.


How do you redirect a url in php?

URL redirects occur when the server, ran by PHP, gives the client a new location to be at. This information is sent using a the HTTP Location header.Such a header can be sent using the header($str) function, where $strequals "Location: http://www.example.com/". This would send the client to example.com.Although uncommon, browsers can be configured to ignore location headers. Do not assume the client will always be redirected.


How do you give href toanother php page?

Here is the code below to redirect a webpage using php: <?php header('Location: url of the webpage'); // example: header('Location: index.php') exit; // exit after redirection is very important as php executes code line by line ?>


Does netscape support php?

PHP support is not up to the clients (browsers). If it runs on the server, then HTML is served to the client. PHP may have generated the HTML, but that does not matter to the client.


What year was PHP invented?

Rasmus Lerdorf released PHP publicly on June 8, 1995 to accelerate bug location and improve the code. This release was named PHP version 2 and already had the basic functionality that PHP has today.


How do you create a redirect webpage?

If you are using PHP you could use this code: (In the <head>) <?php HEADER("Location: http://www.rasclerhys.com"); ?> That should automatically take you to "www.rasclerhys.com"


Why you don't see any PHP code when you view source code of PHP page in browser?

PHP is a Server-side HTML embedded scripting language. It means you can embed you PHP Code in HTML template.When ever Server finds <?php ?> , it always process the code and generate the HTML output. Example:How "Hello World" get displayed on browser. Consider "hello.php" contain <?php echo '<b>Hello World</b>'; ?> . "hello.php" is placed in your server root directory. 1. Client make a request to file. http://localhost/hello.php. Please notice local host may be replaced with your server URL like http://www.myworld.com/hello.php 2. Server receives the request and process "hello.php" . Hence , <b> Hello World</b> HTML output is generated. 3.Server return the output to client. 4.Client [Browser] receive and display the output Hence when we view source we never able to get the PHP Code.


How is PHP code designated in a webpage?

PHP code is never executed by the web browser, and the source code of a PHP file will normally not be sent to the browser at all. In this sense, there is no designation of PHP code on the client's side-- it all appears to be HTML, text, XML, or whatever other type of output you choose to produce. On the server side, PHP scripts are inside of files ending in ".php". Script inside of these PHP files start with . Anything outside of these tags will be sent to the browser as static ("unchanging") output. The code inside the PHP tags start from the top, and are executed sequentially from top to bottom, unless flow control is used to modify the control of the scripts (such as functions, while loops, switch and if constructs, etc).


How do you add code for printing document in php code?

You cannot call the print function from within PHP code. This is mainly because the PHP code is run server-side, and the printer is firmly part of the client's individual setup. That said, you can use JavaScript to politely ask the browser to print the document. The call will cause the browser to bring up its default print dialog. The specific JavaScript method you're after is window.print();


What is client program?

As far as web programming is concerned, client side programming is code that runs in the web browser, rather than the web server. JavaScript is an example of client side scripting because the code is sent to the browser, at which point it is executed. PHP is an example of server side scripting because the code is executed on the server, and the resulting code is sent to the browser and displayed.


How do you connect javascript using php?

Any communication between Javascript code and PHP code needs to be instigated by the Javascript. This is because Javascript is a client side script and PHP is server side. The server can't force data to the browser; it can only reply to requests. The technique of using Javascript on the client side to talk to server side scripts is referred to as AJAX (Asynchronous Javascript And XML). There are several libraries available for simplifying it's usage, and many online tutorials.


What is syntax in php?

We can use php tags in different ways. <?php //php code to be written here ?> OR <? //php code ?> This tag will not work when we using editors such as macromedia dreamweaver. OR < script language="php"> //php code </script>