Ask a Question related to PHP Development, Design and Development.
- Québec #1
getting the browser url line (newbe) Hi ,
How do I get the Url from the browser window? All examples start from an
input hard coded url.
Jean
Québec Guest
-
newbe
Clif Gallagher wrote: To start kde on boot: edit /etc/inittab change the line: id:3:initdefault: to id:5:initdefault: -
Newbe needs help.
Here is my question: I have a webservice that "expose " a function "PutPhoto". This function is used by an asp.net app to send a photo .... -
Newbe php help
I have an HTML form with Firstname, lastname, address I want to save the firstname, lastname and address appended to a file in say results.txt,... -
[PHP] execute command line script from browser
Is there a way to execute a command line php script from a browser by, say clicking a button and then having the browser let go and let the script... -
execute command line script from browser
Is there a way to execute a command line php script from a browser by, say clicking a button and then having the browser let go and let the script... - Alvaro G Vicario #2
Re: getting the browser url line (newbe) *** Québec wrote/escribió (Sun, 5 Sep 2004 07:28:39 -0400):
You actually cannot, since that info is never sent to server. However, you> How do I get the Url from the browser window? All examples start from an
> input hard coded url.
can figure out:
$protocol=$_SERVER['HTTPS']=='on'? 'https': 'http';
$user=$_SERVER['PHP_AUTH_USER'];
$password=$_SERVER['PHP_AUTH_PW'];
$host=$_SERVER['HTTP_HOST'];
$port=$_SERVER['SERVER_PORT'];
$uri=$_SERVER['REQUEST_URI'];
$full_url=$protocol . '://';
if($user){
$full_url.=rawurlencode($user);
}
if($password){
$full_url.=':' . rawurlencode($password);
}
if($user || $password){
$full_url.='@';
}
............ God the idea, don't you?
In any case, I'm pretty sure what you actually need is just this:
$_SERVER['PHP_SELF'];
Use this code to get all available variables:
echo '<pre>';
print_r($_SERVER);
echo '</pre>';
--
-- Álvaro G. Vicario - Burgos, Spain
-- Questions sent to my mailbox will be billed ;-)
--
Alvaro G Vicario Guest




