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


Advertisements:




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







Get Current Location?


How do I get the full URL of the page I'm currently at?


View 3 Replies (Posted: June 12th, 2001, 06:04 PM)

Sponsored Links:

Related Forum Messages:
Echo Current Location
i echo the current location. like the current URL posted on the title bar.

for example the current location is http://phpbuilder.com/board/showthread.php?p=10765321,,

Posted: 11-12-2006, 09:05 PM

View 1 Replies!   View Related
Current Page Location Via REQUEST_URI
I want to split the REQUEST_URI in to pieces Lets say I have a REQUEST_URI like this: /core/info/rules/ And want to display it like this: Core » Info » Rules

Posted: Apr 26 at 11:05

View 4 Replies!   View Related
Php5 - Get User's Current Location?
how can I determine user's current location based on IP (I guess it works this way).Are there any libraries that support it?

Posted: Mar 22 at 22:33

View 4 Replies!   View Related
Facebook - From FQL We Want To Get Users Current Location?
I want to get my friends which belongs to my city from facebook and for this i use current_location.city.But its not working..

Posted: May 12 10 at 12:56

View 2 Replies!   View Related
Get Text File Creation/Current Directory Location?
function out of a class i am currently working which is an API so i dont fully know the server setup it will run on but do want to offer caching so am using few checks.Anyway... my issue is with creating a text file, my understanding of the directory setup is that . means your current directory, when running this script on a server without memcache i am getting the error "could not create a cache text file" which is from fopen yet my if function before this checks if the folder is writeable, and also the /cache/ folder is created and has 0775 permissions does fopen allow ./cache/blah.txt ??P.S $this->debug is set to TRUE at the time of running the script, so i can see the errors

private function write_cache($information, $username){
if(class_exists("Memcache")){//if memcache is installed
[code]....

Posted: 06-18-2010, 07:34 PM

View 1 Replies!   View Related
Get Current Window Location To Send As Parameter To External JS?
I am embedding a external js file on some domains and I need to get the current location of the their URL to send to the server before the script is rendered and not after. I need to this dynamically so I cannot have the user specify the url themselves. For example I have a script:

<script type="text/javascript" src="file.js?url=NEED THIS"></script>

I would love to simply replace NEED THIS with window.location.href, however sadly this would not work. The main problem is that I need to get the url and parse it on the server side to generate the content file.js will deliver so I need this url passed to file.js at the beginning. How can I achieve this without using a iframe?

Posted: May 9 at 3:23

View 1 Replies!   View Related
Get The Current Location Of The Data Pointer For Mysql_fetch_assoc Loop?
Given a $result from a SELECT query that returned 20 rows, what is the simplest way to accomplish what the comment sugggests in the loop?

while ($row = mysql_fetch_assoc($result))
{
// echo "success" when i get to the 9th row
}

Posted: Oct 13 09 at 18:13

View 4 Replies!   View Related
Change Class="current" Location In A List?
have already created my panel tabs with the help of <ol>, <li> and css. it is working perfectly but then there is one problem that occured in the program. this tab <li class="current">the purpose of the class=current that is set in a specified link will help change the background image of the active link. the css code for that is already set and working. I will first show you the codes i used here:

<ol id="toc">
<li>&nbsp;&nbsp;&nbsp;</li>
[code]........

Posted: May 18 at 7:57

View 1 Replies!   View Related
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.

Posted: 04-18-2006, 03:37 PM

View 5 Replies!   View Related
Mobile Web App - Identify Its Location And Display Information Dependent On That Location
I'm in the process of building a mobile web app for phones with wireless and gps, I need the app to be able to identify its location and display information dependent on that location. Eg: One of the apps I've been asked to develop is for a building company. They want their inspectors to be able to visit each building site and open up their control panel and immediately have the information available for that particular location. It also has to offer alternatives, eg if the building site is close to another building site they should be able to select the correct on.

Posted: January 04, 2010, 02:32:59 PM

View 4 Replies!   View Related
Set A Default Value For The Location Field Of A Location Element In Drupal?
I am trying to set a default value for the location field of a location element in a Drupal form. I have figured out how to set default values for all of the other fields (address, additional address, city, state, zip, country) but can't figure out how to set the actual location default. My code:

$settings = array(
'multiple' => array('min' => 0, 'add' => 1, 'max' => 1),
'form' => array(
'collapsible' => FALSE,

[code]....

how to set the default value for the actual location field? I'm sure it's easy but I can't figure it out/find it in the docs for the Location module's API.

Posted: Jan 31 10 at 22:38

View 2 Replies!   View Related
Curl - Follow Location But Only Get Header Of The New Location?
I know that when I set CURLOPT_FOLLOWLOCATION to true, cURL will follow the Location header and redirect to new page. But is it possible only to get header of the new page without actually redirecting there? Or is it not possible?

Posted: May 25 at 18:22

View 3 Replies!   View Related
Geolocation - Find Location Or Near By Location?
I was wondering if there is a script that allows me to find a pretty accurate or near by location of a user using PHP.

I needed this to be implement in my code so wanted to see if anyone know a good solution for this.

Posted: Feb 7 at 5:57

View 3 Replies!   View Related
"header (location)" Inside IFRAME To Load In _top Location?
I have a simple form which is inside IFRAME. When user click on SUBMIT, it redirects to a specific page on my server. The function I use for the redirect is

header ('Location: mypage2.html');
exit ();

But I want the new page to open in _top location, not inside the same IFRAME that I use. How can I tell the browser to open the new page in _top not inside the IFRAME?

Posted: Jun 6 10 at 18:28

View 3 Replies!   View Related
Jquery - Ajax And The Ampersand Conundrum - Share The Current Time Of The Current Track
I know that I should encodeURI any url passed to anything else, because I read this: [URL] I want to share the current time of the current track I am listening to. So I installed the excellent yoururls shortener. And I have a bit of code that puts all the bits together, and makes the following: track=2&time=967

As I don't want everyone seeing my private key, I have a little php file which takes the input, and appends the following, so it looks like this: [URL] So in the main page, I call the jquery of $("div.shorturl").load(loadall); It then does a little bit of CURL and then shortener returns a nice short URL.

[Code]....

Except... the URL which is shortened is always in the form of [URL] - anything after the ampersand is shortened. I have tried wrapping the whole URL in php's URLencode, I've wrapped the track=2&time=967 in both encodeURI and encodeURIComponent, I've evem tried wrapping the whole thing in one or both. And still, the & breaks it, even though I can see the submitted url looks like track=1%26time%3D5 at the end. If I paste this or even the "plain" version with the unencoded url either into the yoururls interface, or submit it to the yoururls via the api as a normal URL pasted into the location bar of the browser, again it works perfectly.

So it's not yoururls at fault, it seems like the url is being encoded properly, the only thing I can think of is CURL possibly? Now at this point you might be thinking "why not replace the & with a * and then convert it back again?". OK, so when the url is expanded, I get the values from

var track = $.getUrlVar('track');
var time = $.getUrlVar('time');

so I COULD lose the time var, then do a bit of finding on where the * is in track and then assume the rest of anything after * is the time, but it's a bit ugly, and more to the point, it's not really the correct way to do things.

Posted: Aug 18 10 at 17:05

View 2 Replies!   View Related
Web Development - Assign A Class Of Current To The Current Page In The Navigation?
I have all the headers and the top navigation included in the page with PHP I want to assign a class to the <li class="current"> so i have a list of <li>'s and the current page should get a class of "current" and the body should get a class of the current page for [URL] = the body should be <body class"home"> and so on

Posted: Feb 2 10 at 20:02

View 1 Replies!   View Related
Getting Rows In Particular Week Of The Current Month Of The Current Year?
I'm wanting to find rows whose date is within the next week of the current month of the current year. The format of the date is, for example: 2010-10-28

Posted: October 21, 2010, 03:25:03 AM

View 4 Replies!   View Related
Ignore Current ID When Checking Current Email Address?
When editing user accounts I want it to not be able to change the e-mail address into existing ones on other rows, but when submitting the form it takes into account that this particular rows email address is the same as the one which was sent via $_POST and throws up the error. The desired behaviour I want is for it to ignore the ID of the row which was posted, but take into account every other row.

Here's the code as it stands at the moment:

$email = $_POST['email'];
$checkemail = mysql_query("SELECT email FROM users WHERE email='$email'");
} if (mysql_num_rows($checkemail) > 0) {
return $this->error("The e-mail address you provided is already associated with an account.");
}

Posted: February 18, 2011, 09:24:28 PM

View 2 Replies!   View Related
If Else Statements To Compare Current Day And Current Month
I am attempting to make a way so that my users have to be 13 years old in order to register, is there any easy way to do this, or am i coding 3 if else statements to compare current day and current month, and current year to the posted y/m/d?

Posted: March 22, 2007, 02:20:26 PM

View 4 Replies!   View Related
Get The Full Current Web Url Including Current #anchor?
Dear fellow earthlings, a question about the URL of a current page. On my page there is a div with "Share this link" box, where the php has to echo the curent domain + page link, everything, including thecurrent anchor "#"

<?=$currentlink?> could be "http://website.org/language/page#anchor17"

Question A is it possible for php to know and echo the full current link all the way from the first httpL//.... till #anchorxxx ?

Question B Whats the php function to show the entire current url?

Posted: Feb 26 at 19:18

View 1 Replies!   View Related
Get The Current Weekend Depending On The Current Date?
I'm trying to get this weekend in php.

I get the current date by code :

$start_date = date("Y-m-d H:i:s", time());

How I can get the current weekend depend on the current date?

Posted: Nov 22 10 at 8:58

View 5 Replies!   View Related
Add A Class Of "current" On A Menu For The Current Page?
I'm creating a menu and was wondering if how i would add a class of "current" on a menu for the current page e.g. [URL]

Posted: Jun 21 10 at 1:37

View 2 Replies!   View Related
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).

Posted: 03-31-2006, 02:15 AM

View 1 Replies!   View Related
Html - Select <option Selected=""> Doesn't Work - Year And Month Automatically Sets To The Current Year And Current Month
I have 3 html <select> the year, month, and day. Both the year and month automatically sets to the current year and current month. I did that purely in PHP. However, the day which is being triggered by Javascript doesn't seem to work even though I already did if (j == <?php echo date('d') ?>) days_select.options[days_select.options.length] = new Option(j, j, true);

The default day is still 1 not the current day. What is even frustrating is that when I checked it on firebug the selected day is the current day... I am a total noob in programming that's why simple things like these are kinda hard for me to grasp.

date_select.php
<body onload="loadDays();">
<script type="text/javascript" >
function loadDays() {
var year = parseInt(document.getElementById('years').value);
var month = document.getElementById('months').value;
var months = new Array
[Code].....

Posted: May 5 at 2:29

View 2 Replies!   View Related
Difference Between The Current Timestamp In The GMT Time Zone And The Current Timestamp In Local Time Zone?
This is a sample question i found at ZEND php certificate practice test, the correct answer of this question is:
"
There is no difference between the current time in any time zone—the current time is an
absolute point in time!
"
This answer is very odd and confusing.I don't understand why this answer is correct, actually I think it depends on the number of hours between the local time zone and GMT.

Posted: Nov 10 10 at 21:37

View 3 Replies!   View Related
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.

Posted: July 16th, 2005 10:36 PM

View 1 Replies!   View Related
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.

Posted: July 18th, 2006 02:35 PM

View 4 Replies!   View Related
Get Location
May I know the PHP code to know visitors' location like CA,USA.

Posted: 04-06-2006, 08:24 AM

View 5 Replies!   View Related
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");

Posted: 04-17-2007, 07:04 PM

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

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

Posted: April 09, 2007, 01:25:07 PM

View 11 Replies!   View Related
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.

Posted: September 23rd, 2002, 03:05 PM

View 2 Replies!   View Related
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.

Posted: July 17th, 2005 12:55 AM

View 6 Replies!   View Related
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.

Posted: October 20th, 2003, 03:26 PM

View 1 Replies!   View Related
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?

Posted: January 16th, 2006 12:15 AM

View 4 Replies!   View Related
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) ?

Posted: July 17th, 2005 01:00 AM

View 1 Replies!   View Related
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.

Posted: November 19, 2007, 07:50:45 PM

View 5 Replies!   View Related
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

Posted: March 12, 2007, 11:12:55 PM

View 2 Replies!   View Related
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');

?>

Posted: November 08, 2007, 09:25:34 PM

View 1 Replies!   View Related
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");

Posted: April 17, 2007, 06:07:38 PM

View 2 Replies!   View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved