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
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?
Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.