Jump to content


Photo

How to get page/file name from Domain?


  • Please log in to reply
7 replies to this topic

#1 jvalarta

jvalarta
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 09 February 2006 - 06:13 AM

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!

#2 TEENFRONT

TEENFRONT
  • Members
  • PipPipPip
  • Advanced Member
  • 338 posts

Posted 09 February 2006 - 06:24 AM

[!--quoteo(post=344023:date=Feb 9 2006, 01:13 AM:name=jvalarta)--][div class=\'quotetop\']QUOTE(jvalarta @ Feb 9 2006, 01:13 AM) View Post[/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?
Teenfront.co.uk : Free Teen Chat -  FunkySmileys.co.uk : MSN Smileys -  ArcadeMonkey.co.uk : Free Flash Games
8Baller.co.uk : Free Multiplayer Pool [url=http://8Baller.co.uk]

#3 jvalarta

jvalarta
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 09 February 2006 - 06:33 AM

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

#4 jvalarta

jvalarta
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 09 February 2006 - 10:19 PM

Anyone? Or is this just not possible? Oh PHP Guru, art'thou in my time of need??

#5 jvalarta

jvalarta
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 09 March 2006 - 05:57 AM

I'm still in search of the answer to this...anyone?

#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 09 March 2006 - 06:10 AM

[!--quoteo(post=353161:date=Mar 9 2006, 05:57 AM:name=jvalarta)--][div class=\'quotetop\']QUOTE(jvalarta @ Mar 9 2006, 05:57 AM) View Post[/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.


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#7 jvalarta

jvalarta
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 09 March 2006 - 07:20 PM

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.

#8 fusionpixel

fusionpixel
  • Members
  • PipPipPip
  • Advanced Member
  • 64 posts

Posted 09 March 2006 - 07:53 PM

have you tried searching in the Javascript world?
Did you know there is a manual for PHP? [a href="http://" target="_blank"]http://www.php.net[/a]
Did you know there is a manual for mySQL? [a href="http://" target="_blank"]http://www.mysql.org[/a]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users