Jump to content

How to get page/file name from Domain?


jvalarta

Recommended Posts

Is there a way to give PHP a domain and have it return the "index" page name? Seems like this would be simple, but I'm not finding a solution.

Example: [a href=\"http://www.domain.com\" target=\"_blank\"]http://www.domain.com[/a]

What I need is to have it return the default page name, like index.htm, or index.php, etc.

Help!
Link to comment
https://forums.phpfreaks.com/topic/3357-how-to-get-pagefile-name-from-domain/
Share on other sites

[!--quoteo(post=344023:date=Feb 9 2006, 01:13 AM:name=jvalarta)--][div class=\'quotetop\']QUOTE(jvalarta @ Feb 9 2006, 01:13 AM) [snapback]344023[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is there a way to give PHP a domain and have it return the "index" page name? Seems like this would be simple, but I'm not finding a solution.

Example: [a href=\"http://www.domain.com\" target=\"_blank\"]http://www.domain.com[/a]

What I need is to have it return the default page name, like index.htm, or index.php, etc.

Help!
[/quote]


Wheres the page located? Your server?
  • 4 weeks later...
[!--quoteo(post=353161:date=Mar 9 2006, 05:57 AM:name=jvalarta)--][div class=\'quotetop\']QUOTE(jvalarta @ Mar 9 2006, 05:57 AM) [snapback]353161[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'm still in search of the answer to this...anyone?
[/quote]
[a href=\"http://www.php.net/manual/en/function.parse-url.php\" target=\"_blank\"]http://www.php.net/manual/en/function.parse-url.php[/a]
good luck mate use phase.

Thanks redarrow, but this would only work if the file name was present...that's my challenge, to find the index file name only from giving PHP the domain name.

Example:

Example: [a href=\"http://www.domain.com\" target=\"_blank\"]http://www.domain.com[/a]

I need to have PHP go to that domain, and tell me what the default page name is (i.e. index.php, index.htm, or whatever it may be)

The purpose of this is to have our service tell people which page is their home/index page...our clients are very novice so we need to make this as simple as humanly possible for them.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.