Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

 
 URL Validation/IP Resolution
Author:  (---.pel.mweb.co.za)
Date:   03-23-03 08:30

Hi,

I’m stuck with a little piece of code… Maybe anybody can help? I’m just about to inflict a serious amount of pain upon myself!

I need to check if a list of urls on a domain is valid…

E.g. Take PutuPot.com

http://www.putupot.com/index.php
Is valid… it exists under putupot.com

http://www.putupot.com/advertising.php
Is valid… it exists under putupot.com

http://www.putupot.com/test.php?id=10
Is valid… it exists under putupot.com

http://www.putupot.com/redirect.php?id=33
Is not valid… because after redirection the end result is aardvark.co.za


I need to write a function so that….

“www.putupot.com”;
and
“www.putupot.com/redirect.php?id=33”;

…will give me 2 different IP addresses… ‘cause if the IP addresses differ, I know the url that redirects points to a different domain.

GetHostByName don't work with urls that has paramaters... So that is not the solution :(

or... If there is another way to do this, please let me know!

Thanks a stack!

 Topics Author  Date
 URL Validation/IP Resolution  new
Rudi Westraad 03-23-03 08:30 
Go to Top  |  Go to Topic  |  Flat View  |  Search 
  |  
New Topic
 Reply To This Message
 Your Name:
 Your Email:
 Subject:
Email replies to this thread, to the address above.
  wrote: > > Hi, > > I’m stuck with a little piece of code… Maybe anybody can > help? I’m just about to inflict a serious amount of pain upon > myself! > > I need to check if a list of urls on a domain is valid… > > E.g. Take PutuPot.com > > http://www.putupot.com/index.php > Is valid… it exists under putupot.com > > http://www.putupot.com/advertising.php > Is valid… it exists under putupot.com > > http://www.putupot.com/test.php?id=10 > Is valid… it exists under putupot.com > > http://www.putupot.com/redirect.php?id=33 > Is not valid… because after redirection the end result is > aardvark.co.za > > > I need to write a function so that…. > > “www.putupot.com”; > and > “www.putupot.com/redirect.php?id=33”; > > …will give me 2 different IP addresses… ‘cause if the IP > addresses differ, I know the url that redirects points to a > different domain. > > GetHostByName don't work with urls that has paramaters... So > that is not the solution :( > > or... If there is another way to do this, please let me know! > > Thanks a stack! ">  

Provided By
Phorum