Re: [PHP] apache_lookup_uri problem

2001-03-30 Thread Yasuo Ohgaki

I haven't use apache_lookup_uri() yet, but I believe it is for getting local
server's uri info.
I think your PHP script is located web document root, right?
Therefore, you get "/" before the string.

If you want to get remote URI info, use HEAD request. (Refer to RFC for details)

--
Yasuo Ohgaki


"Chris Cochella" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am using the apache_lookup_uri function and I am having a problem.
>
> I have PHP4 as an Apache module.
>
> If I give the command:
>
>
> $link = "http://www.mysite.com/";
>
> $lookup_results = apache_lookup_uri($link);
>
>
> And I output:
>
> echo $lookup_results->uri;
> echo $lookup_results->status;
>
> I get:
>
> /http://www.mysite.com
>
> (that is if the page that has the script is in document root)
> and
> a status of:
>
> 200
>
>
> Even if the link is bad I get a status of 200.
>
> Why is there a leading "/"?
> Am I forming the the URI incorrectly and that is causing a prepend to the
> link?
>
> Any help would be great.  I have scanned the archives and various script
> archives with no results.
>
> Thanks in advance.
>
> Chris
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] apache_lookup_uri problem

2001-03-29 Thread Chris Cochella

I am using the apache_lookup_uri function and I am having a problem.

I have PHP4 as an Apache module.

If I give the command:


$link = "http://www.mysite.com/";

$lookup_results = apache_lookup_uri($link);


And I output:

echo $lookup_results->uri;
echo $lookup_results->status;

I get:

/http://www.mysite.com

(that is if the page that has the script is in document root)
and
a status of:

200


Even if the link is bad I get a status of 200.

Why is there a leading "/"?
Am I forming the the URI incorrectly and that is causing a prepend to the
link?

Any help would be great.  I have scanned the archives and various script
archives with no results.

Thanks in advance.

Chris


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]