jvalarta Posted February 9, 2006 Share Posted February 9, 2006 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 Link to comment Share on other sites More sharing options...
TEENFRONT Posted February 9, 2006 Share Posted February 9, 2006 [!--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? Quote Link to comment Share on other sites More sharing options...
jvalarta Posted February 9, 2006 Author Share Posted February 9, 2006 No. the pages are potentially anywhere on the net (any domain name). These are client domains, and we are building a service to index their pages (site map on the fly). It works perfectly, except for the home page. So close, yet so far... Quote Link to comment Share on other sites More sharing options...
jvalarta Posted February 9, 2006 Author Share Posted February 9, 2006 Anyone? Or is this just not possible? Oh PHP Guru, art'thou in my time of need?? Quote Link to comment Share on other sites More sharing options...
jvalarta Posted March 9, 2006 Author Share Posted March 9, 2006 I'm still in search of the answer to this...anyone? Quote Link to comment Share on other sites More sharing options...
redarrow Posted March 9, 2006 Share Posted March 9, 2006 [!--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. Quote Link to comment Share on other sites More sharing options...
jvalarta Posted March 9, 2006 Author Share Posted March 9, 2006 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. Quote Link to comment Share on other sites More sharing options...
fusionpixel Posted March 9, 2006 Share Posted March 9, 2006 have you tried searching in the Javascript world? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.