Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Get Location


May I know the PHP code to know visitors' location like CA,USA.




View Complete Forum Thread with Replies

Related Forum Messages:
Using The GET Function And Passing The Variables From The Remote Location To The Local Location.
I have an local and remote database and i need to update the local one with some of the details obtained by the remote one, I have tried to do this using the GET function and passing the variables from the remote location to the local location. I am finding that this is not a very relible way of doing this, does anyone have any idea about how i can do this in a better way.

View Replies !
How Can I Store The File Location Of The File In The DB (the Location Of The File On The Server).
How in the world can I do this: uploadforms.php - A form where you simply input a title, choose a file to upload, add a comment for the file, and select a catagory for the file. All of this info is then passed onto upload.php. upload.php - this takes the info from the forms puts it in a database, I know how to get all the text into the database, but how can i store the file location of the file in the DB (the location of the file on the server).

View Replies !
Location?
I want to use 'location' to redirect to link to another page:

<?php
header("Location: http://localhost");

?>

works fine, but when i introduce start_session, all i get is a blank page:

<?php

session_start();

header("Location: http://localhost");

?>

Can anyone give me a hint, do I need to change my php.ini-file or something
like that?? I use apache and php 4.3.1, local installed.

View Replies !
Self Location....
Is there are way, so I can retrieve the filename being runned and/or
its location?

Currently it is C:InetpubwwwrootJOTIntranetmoduleshelloworld but
that might change. I need to create some temporary files in the same
catalog.

View Replies !
PHP.ini Location
How do I change the php.ini location when using Apache1.3? I know in
Apache2 theres a directive PHPIniDir, but is there something similar
for Apache1.3?

View Replies !
Not Going To The Right Location
i have on folder called test. Within test there are two folders called problem and the other solution.

At the moment i am in the solution folder and wish to go to the problem folder which has a file called index.php. Porblem is how to I write this.

// doesn't work $test = ".index.php";
header("Location: $test");

View Replies !
No Location
if ($Location='') {
     print "No location";
} else {
     print "Location available";
}

Some users leave the Location-field empty (when submiting their detail.

View Replies !
Location.href
I use the php application phpPGAdmin which allows me to manage my Postgres database. I noticed that the application, if you click on an option that is a href (which passes along variables with it), you are taken to the approriate 'page' but the address in the browser always says http://..../index.php, even though the 'page' displayed is from the main.php program.

I noticed that at the start of the main.php they set location.href to:location.href = "index.php";

I was wondering if this might be done to hide the href string that is sent to invoke main.php. Seems like a good way to hide what you pass along if you are not invoking a window using hidden fields on a form.

View Replies !
Alternate Location For Php.ini
Is there a way to set php.ini to the alternate location?

I'm trying to use 2 version of PHP(php4 and php5), but php.ini is in the
way. Anyone knows how to circumvent this issues? Perhaps there is an env
variable we can set.

View Replies !
Location Of Cookie
I am using the cookie and session to protect the web site. I am having problem with netscape in windows 2000. I want to know which location does netscape saves the cookie or how does the setcookie command differs in their working in win98 and win2000. I tried to destroy the cookie in win2000 but I could not find the location of cookies directory in win2000 but the program works ok with win98- all browser and windows 2000 all browser except netscape. As a first measure to detect whether it is the problem of cookies or not, I want to destroy the cookies in Netscape and check.

View Replies !
Changing The Location Of Php.ini
Does anybody know how to change where PHP looks for the php.ini file? It currently looks for the .ini file in /usr/local/lib. I need to change this so it looks at /home/john/usr/local/lib.

View Replies !
Get Current Location?
How do I get the full URL of the page I'm currently at?

View Replies !
Calling An FTP Location In PHP
This (im hoping) is an easy problem to solve!
Quite simply, i have a HTML login form, where users can type their
usernames and passwords for an FTP server of mine.

The code im using is;

<?
//set variables for form values of previous page to make next code
easier.
$user = $_POST['user'];
$pass = $_POST['pass'];
$login = "Location: ftp://{$user}:{$pass}@12.34.5.67/";

header( "$login" );

?>

User and Pass are boxes on the form before hand, and all works fine-
however, the page this opens is a list of files that are inside that
ftp location- instead of a 'folder view' that you usually get with most
modern versions of windows. You can easily get to the folder view by
hitting refresh when the file list shows up, but this ideally isnt what
i want.

So is there another method of calling that page so that it goes
straight to folder view? Maybe opening it up in another window would
work, but how would i do that?

View Replies !
Php.ini Location Question
I'm trying to set the PHP include path for a PHP class on my web host, but I
don't have access to the root php.ini.

My host allows me to have my own php.ini which applies to each directory it
appears in but it seems I need to have a php.ini in each and every directory
I want my include path to apply in.

I would rather avoid having a php.ini in each directory, since it's a class
I use all over my site (phpMailer - excellent multipart email class).

Is there any way to make my php.ini in my webserver root apply to all
sub-directories, or another way to achieve this (btw - I can't use
..htaccess) ?

View Replies !
Header CSS Location
I've created header/footer files, and included them in all the pages of my website. My problem is that in the header file, I have

link href="css/default.css" rel="stylesheet" type="text/css"

which doesn't apply for each page, since I have some pages in folders for organizational issues. Is there a way to make that reference dynamic somehow? I don't even know if my thinking is correct. I've seen $_SERVER['DOCUMENT_ROOT'] been used, but tried it and received errors. I'm not sure if I set it up correctly.

View Replies !
Header('location:$url);
i was just wondering if i made a a php page using header('location:$url); and i just want get a certain part or the page what says the solution is: blah.

then store in a variable and then print it back out or do i have to use the file_get_contents but if i use file_get_contents i have to use 3 cookies

View Replies !
Location Header
is it possible to send data via location header like so

<?php

$search = 'random';
$location = 'mysite.com/myfile.php?search='.$search; // mysite.com/myfile.php?search=random
header('Location: $location');

?>

View Replies !
Location Problem
i have on folder called test. Within test there are two folders called problem and the other solution. At the moment i am in the solution  folder and wish to go to the problem folder which has a file called index.php. Porblem is how to I write this.

// doesn't work $test = ".index.php";
header("Location: $test");

View Replies !
Location Of The Link
so i want to be able to have certain things in my links like so:

woods.php?area=1

not i dont want them to be able to change the 1, i have seen sites that when you hover over a link and the description and location of the link comes up in the bottom of the page it has all these ?step=1&blah=2 etc etc but when you click the link it doesnt have anything in the url bar except doc.php.

View Replies !
File Location
I'm creating a script that will upload a file,create a txt file and add data to a .htaccess file. The problem im having is that the script runs from digg/stats and the .htaccess is in /digg/ aswell as the picture upload place, but I cant seem to run the script from digg/stats and get the .htaccess updated in /digg/ nor will the picture upload to that place, below is my code:

View Replies !
File Location?
I'm having a problem using fopen on a file from a seperate class. I have index.php, which invokes class System in system.php, which invokes class Skin in skin.php Some information first: Code:

View Replies !
Database Location
how do i find out where my mysql database is? like when it says:

<?php
//mysql info
$host = "?";
$username = "*myusername*";
$password = "*mypassword*";
$database_name = "adminUser";
?>

View Replies !
Location Of Php.ini File
I am connect to a site through ftp client and I would like to know the location of php.ini file .?

View Replies !
Geo Location On IP Address
Anyone know about a script/product that can determine "rough" geo location for a user (as rough as "The Americas", "UK", "Europe" etc). I'm wanting to show prices in Sterling/Euro/Dollar, and would like to serve up the ideal one to the site visitor.

View Replies !
Getting End User Location
Is it possible to get a users location when they visit my website. is there some other piece of code similar to how ip addres is obtained.

View Replies !
Detecting Location
I want to display certain links if a person is viewing my website from the USA. How do I detect their location?

View Replies !
IP Address -> Location?
i would like to log geographical location for every IP accessing my website [usa, germany, italy,...]. i read several sites but everything seems complicated and way from being reliable..

View Replies !
PHP Extension Location
My directory structure is like this.

phpdev5
|
| --gtkdev
| |
| |---php4
| php.ini and other files
|
|--php
| |
| |--extensions
| |--class
| |--dlls

The php.ini file has the directive extension_dir = ./ When I uncommented the extension for php_mcrypt.dll so I could use it's functions I got the error; "Unable to load dynamic library './php_mcrypt.dll'. The specified module could not be found." I can't remember from DOS days how to write the directive so it looks in the correct directory for the dll. I have to have it back up one directory then tell it that the dll is in /php/extensions.

View Replies !
Still The Quest For PHP.INI Location ...
Is it possible to define the full-path-name of php.ini file using the apache directives? Using the OS, you can define PHPRC to tell apache where to look the php.ini. How can I do it within Apache?

View Replies !
Result Location
If I select a single row from a table and order results by the primary key (auto incrementing #), how would I know the position my selected result is in? So "Result 5 of 58" works without running loops.

View Replies !
Header Location
PHP Code:

<?
require('dbconection.php');
$id_producto = $_GET['id_producto'];
$id_ses = $_GET['id_ses'];

$borrar = mysql_query("DELETE FROM don_carrito_temp WHERE id_ses='$id_ses' AND id_producto='$id_producto'");
if ($borrar){
    header("location: index.php?id_ses=$id_ses");
}

?>

and after I call it. it shows me this:

"
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
"

View Replies !
Copy Img Location
how to copy tthe files to the database. got an error while copying the file using copy command. any way to solve it. coud i get the code for it.

View Replies !
Get User Location
i need to capture visitor's location state. what is the best way to do this?

View Replies !
[error]Which Location?
I'm a newbie learning PHP APACHE MySQL from a manual.

I've reached the errors processing chapter, they made me type a nice
"error.php" file which handles errors 400, 403, 500, except they don't
say where to copy it.

I tried under c:wampwww, c:wampapache2errors, but it doesn't
spark.

I modified httpd.conf that way:

Code: ( text )

View Replies !
IP -> Location Resolution
is there a free service todo this... all i want is a zipcode i want to serve my users with their local weather

View Replies !
Remember Location
What would be the best way to remember a location on a map or something? Think of an RPG. When you come back, your location should be the same as when you logged off.

View Replies !
Header Location
i use php5, sometimes i see that header(location:index.php); takes me to a blank page, i have never experienced that in linux. no matter what the code before the header contains, it just takes me to a blank page. if i put javascript location.href with the same path it works fine (not such a good idea. system info: Windows NT SERVER9 5.0 build 2195. PHP Version 5.1.2.

View Replies !
Using Header Location
I have a php script that does some form input validation. As it verifies each field if the field has incorrect data, it appends an error message to an $error array. E.g.

if (an_error = true) {
$errors.="<tr><td>You have note entered a surname. This is mandatory date
of birth incorrectly.</td></tr>";


View Replies !
Filter By Ip Location
i want to hide a button from people visiting the website from toronto. i realize this is not foolproof, but it's not needed to be. is there a special code i would use for something like:

if ($remote_addr == "toronto"){
//don't show the button
}

i am not familiar with the many uses for remote host or addr, but i do know many ips use the customer's city in the string somewhere (i see it in my server logs.

View Replies !
Find Visitor Location From IP
How can i find a visiters location by there ip addy.. i know this is possiable in perl.. but is it possible in php?

View Replies !
Finding The Location Of The Function
To find out from where the particular function was called, we can use
debug_backtrace ( ) inside the function. Is there any way to find in
which the function is. I mean if there are large number of files in the
project and I want to find out where the function is.


................ code ...............

// where is the location of the function()
function()

................ code ...............

View Replies !
PHP Equivalent For Window.location
What's the PHP equivalent for the following?

if(window.location == "http:/site.com/page1.html")
{
}
else
{
}


View Replies !
Header Location Newbie
I'm doing a relative URL redirect using this:

<?

header("Location: ../research/index.php?current=34");

?>

which works fine, except it redirects to the .org.uk version of my site
rather than the .org version.

Where does it get this from ?

View Replies !
Window.location With Target
I've the following piece of code use window.location to open a new window an
pas them some paramenter. I'd like to open the new windows in a frame using
a javascript. how can I do that.
Pls. help.

<input class="nxtbutton" type="button" id="NXT_FormLink" value="<?php echo
$KT_language['detail'];?>"

onClick="window.location='auftragedit.php?KT_id_kunde=<?php echo
$HTTP_GET_VARS['KT_id_kunde']; ?>&id_auftrag=<?php echo
urlencode($auftrag->Fields("id_auftrag"))?>&KT_back=<?php echo
urlencode($HTTP_SERVER_VARS['PHP_SELF'].'?'.@$HTTP_SERVER_VARS['QUERY_STRING
']); ?>'">

View Replies !
Header('Location:') Jump Ignored?
I'm seeing a problem that has me flummoxed. The only thing I can
think of is that I'm violating some rule I don't know about.

I have some code that does some processing and then does a
header('Location: ...) jump to page A on success or falls through to
the jump to page B. This is the code:

if ( mysql_query( 'LOCK TABLES tableX WRITE', $link ) )
{
mysql_query( $q, $link ) ; // store the record
$ID = mysql_insert_id( $link ) ; // save the new id

if ( mysql_affected_rows($link) == 1 )
{
unlock_tables() ;
$_SESSION['ErrMsg'] = 'New ID is ' . $ID ;
header( 'Location: PageA.php' ) ;
$_SESSION['ErrMsg'] .= ' Error: ignored jump' ;
}
else // the store failed
{ error handling }
}
// second chance (for debugging) to do the right thing
header( 'Location: PageA.php' ) ;
$_SESSION['ErrMsg'] .= ' and it ignored it AGAIN!' ;

// and we shouldn't get here at all -- but we do!
header( 'Location: PageB.php ) ;


Unfortunately, as I know from the telltales I stuff into session, the
store works but the interpreter ignores both header calls that would
jump to A and finally jumps to B instead. Unless I'm more tired than
I'm aware, or more ignorant, this doesn't make sense.

View Replies !
Header Location And Redirect
From my record insertion page I do, in some cases, this:

header("Location: http://$SERVER_NAME/mainpage.php?SID");

problem is that the mainpage.php doesn't takes new datas. I've to refresh
the page to see the new inserted record.

doing this:
header("Refresh: 0; URL=http://".$_SERVER['HTTP_HOST']."/mainpage.php?SID);

isn't considered a good alternative.
I want to redirect to the mainpage.php with refreshed datas.

How to do so ? may I keep Refresh header command or it will not work on some
browser ?

View Replies !
Header Set-cookie + Location
I have tried using this code, but it won't work for me:

<? header ("Set-Cookie: hit_id='$id'nLocation: <A HREF="http://www.mysite.comnn");" TARGET=_blank>http://www.mysite.comnn");</A>?>

now on my own pc (win98) it works, but on my site nothing happens any ideas??

View Replies !
Php - Header Location Very Slow
I have a problem after a client clicks a Confirm button on a
form - the form processes the data, inserts into a database, and then
redirects using header Location.

I have tested this on two different Linux/Apache servers. One works
perfectly, the other takes about 90 seconds to redirect.

Has anyone seen this issue before ?

It uses a function like this :

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCE SS, &#391;', 'SSL'));

function tep_redirect($url) {
if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We
are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { //
NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); //
Change it to SSL
}
}

header('Location: ' . $url);

tep_exit();
}

In my tests - I'll receive the confirmation email *beofre* I see the
success page in the browser!

View Replies !
Fwrite To A Pre-defined Location
What I need is to write to a file about 30 bytes in. It's a login
scipt, and now what it does is fwrites a command at the end of a file,
but it needs to be midway through the file in order for it to work.
Preferably it needs to write to another file, then be read by
login.php. But that doesn't work because it doesn't know why there is
an if statement.

View Replies !
Location Of File (fopen)
This is something I always have trouble keeping straight. Assume I have a
file tree as follows:

/home
/home/me
/home/me/public_html
/home/me/public_html/dir1
/home/me/public_html/dir2

My web pages are under either public_html or public_html.dir1. If I want to
create a file under public_html/dir2, in php, is the correct command

$FL = fopen("/home/me/public_html/dir2.filename", "w");
-or-
$FL = fopen("/dir2.filename", "w");

What effect does "open_basedir" have on this - and how can I, as a PHP user
be sure how this parameter is set.

View Replies !
Get Users Location - IP Address
Just wondering if its possible to get a visitors country / state based on their IP Address?

I'm looking at displaying relevent news and weather info for each visitor based on their location.

View Replies !
Location Header From Class
I try to call a Location header from an included class.
It didn't work.
If I didn't include but write the code of the class in the page everything
is fine.
So I thought it is an include problem but the instantiation of the class is
even when included working.
A print_r shows me the type of the class.
What else can be a problem?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved