[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 10-30-2004, 10:16 AM   #26 (permalink)
NamePros Regular
 
Join Date: May 2003
Posts: 200
746.50 NP$ (Donate)

trader is an unknown quantity at this point


Please excuse my lack of programming knowledge but I have 2 basic questions for all of you and that is I just don't get what use this can be to me?

Could you please explain in easy to undertstand terms how I may apply and use this and the exact benefit of it. Sorry I do not grasp its usage at all.
trader is offline  
Old 10-31-2004, 07:45 AM   #27 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


Quote:
Originally Posted by -RJ-
Ideally, it should be able to handle all types of domains, including .co.uk and URLS that contain uppercase letters (http://WWW.NamePros.com/ returns namepros.com)
Even subdomains that are not second or or third level domain names? So http://sub.sub2.sub3.sub4.sub5.net would be okay? Or are you looking for it to only match real domains?
deadserious is offline  
Old 10-31-2004, 07:51 AM   #28 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


Quote:
Originally Posted by RealNames
Please excuse my lack of programming knowledge but I have 2 basic questions for all of you and that is I just don't get what use this can be to me?

Could you please explain in easy to undertstand terms how I may apply and use this and the exact benefit of it. Sorry I do not grasp its usage at all.
Well it could be used as part of a larger script or something which for example, would allow users to enter a large amount of URL's into a form and it would strip all the domain names out of each url so you could have a nice clean list of domains to do whatever you wanted with. That's just one example to give you an idea.
deadserious is offline  
Old 10-31-2004, 12:04 PM   #29 (permalink)
₪NamePros Elite™
 
PolurNET's Avatar
 
Join Date: Jul 2004
Location: Kingston, Canada
Posts: 2,963
365.30 NP$ (Donate)

PolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant future

Alzheimer's Cancer Survivorship Third World Education Autism Save a Life Cystic Fibrosis Parkinson's Disease Lou Gehrig's Disease (ALS) Autism Multiple Sclerosis SIDS
Quote:
Originally Posted by deadserious
Quote:
Originally Posted by -RJ-
Ideally, it should be able to handle all types of domains, including .co.uk and URLS that contain uppercase letters (http://WWW.NamePros.com/ returns namepros.com)
Even subdomains that are not second or or third level domain names? So http://sub.sub2.sub3.sub4.sub5.net would be okay? Or are you looking for it to only match real domains?

I solved the problem, don't worry, my script takes care of it all
__________________
•• PolurNET Communications •• Avoid the Freeze, Enjoy the Breeze!
= A very special day, February 12th =
Proudly #1 on NamePros and WebHostingJury for over 3 years!
||LawPoint.org •• GREAT UK HOSTING DEALS NOW AT: ExcellentHost.com ••
PolurNET is offline  
Old 10-31-2004, 04:24 PM   #30 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


Quote:
Originally Posted by PolurNET
I solved the problem, don't worry, my script takes care of it all
And I should just take your word for that shouldn't I? Just like the first code you posted was the "best custom function" although you had to go on and post 5 more variations of it? And just like your version 2.7.0 was the "final version, all integrated, and 100% working" although you went on and posted yet "another" final version?

And just like you claimed the code that I posted was "your version 2.5" when in fact it was a modified example off php.net just like I said it was. And if you compare the results from the code I posted and the code you posted you'll see there's quite a difference. And just like you claimed that your version 2.5 results in "nameprosrules.tld" when the actual result of your code in that version is "subdomain.nameprosrules.tld"? But I should just take your word for everything even when you don't even know the results of your own code?



And I should just take your word for everything you said although most everything you said was a bunch of inaccurate jargon shouldn't I? Actually I don't think so, you may have said something that was accurate, but I sure wouldn't take your word for it considering all the inaccurate jargon you've posted. And if you cared to notice I was not asking you the question that I posted. Maybe if you would have posted with an answer other than one basically telling my I should not post or ask questions just because you say so I would have let it go at that just like I initially did when you inaccurately claimed the code I posted was "your code," although your code didn't even do what you said it did, and the code I posted actually did do what you inaccurately claimed your code did.

And I'm surely not worried about anything, especially not posting or asking questions just because you say I shouldn't. I'll post and ask questions as I feel necessary.
deadserious is offline  
Old 10-31-2004, 04:27 PM   #31 (permalink)
₪NamePros Elite™
 
PolurNET's Avatar
 
Join Date: Jul 2004
Location: Kingston, Canada
Posts: 2,963
365.30 NP$ (Donate)

PolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant future

Alzheimer's Cancer Survivorship Third World Education Autism Save a Life Cystic Fibrosis Parkinson's Disease Lou Gehrig's Disease (ALS) Autism Multiple Sclerosis SIDS
Whoa, are you feeling okay?

All i got to say is:

so far ezimedia, and RJ can vouch on my behalf that the code works 100% as described, and the reasons for variations are due to improvements and bug fixes, a natural process in all php scripts. If you have personal problems with me that are hard to solve, then I suggest you re-read the Namepros rules, that state respect & professionalism

Thanks
__________________
•• PolurNET Communications •• Avoid the Freeze, Enjoy the Breeze!
= A very special day, February 12th =
Proudly #1 on NamePros and WebHostingJury for over 3 years!
||LawPoint.org •• GREAT UK HOSTING DEALS NOW AT: ExcellentHost.com ••

Last edited by PolurNET; 10-31-2004 at 04:30 PM.
PolurNET is offline  
Old 10-31-2004, 05:55 PM   #32 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


Quote:
Originally Posted by PolurNET
Whoa, are you feeling okay?
And I'm the one that needs to understand what respect and professionalism are, yea right. It was just so respectful and professional of you to respond to me as if I'm mentally disturbed or something, hmmm

Quote:
Originally Posted by PolurNET
All i got to say is:

so far ezimedia, and RJ can vouch on my behalf that the code works 100% as described, and the reasons for variations are due to improvements and bug fixes, a natural process in all php scripts. If you have personal problems with me that are hard to solve, then I suggest you re-read the Namepros rules, that state respect & professionalism

Thanks
And I suggest that you learn what respect and professionalism actually mean. They surely don't mean that I cannot disagree with you or that everyone must believe everything you say nor do they mean plagiarism and inaccuracy. I think you're the one that needs to re-read the Namepros rules. Of course I know what the rules state, I wrote half of them, but it looks like you're only able to selectively understand the rules in a single forum just like you were only able to selectively respond to what I said while ignoring the whole point. And if you cared to notice I never questioned anything about your final code not even whether it works as described or not. This was of no concern to me. I think if you cared to read everything that I said you'll be able to easily understand what I'm saying and why I said it.

And to answer your question since you didn't seem to get it from what I have already said. No I don't have a personal problem with you, and of course I could solve it if I did (The ignore feature works well)

I have a problem with you basically telling everyone who wants to post their code here or ask questions that are not even directed towards you that there is no need to do so because your code is the best, and that their code is your code, and that everyone else is wasting their time and that no one else should even participate just because you say so.
deadserious is offline  
Old 10-31-2004, 11:59 PM   #33 (permalink)
RJ
NamePros Founder

Administrator

 
Join Date: Feb 2003
Location: Bay Area, CA
Posts: 13,173
97,201.68 NP$ (Donate)

RJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatness

Find Marrow Donors! Cystic Fibrosis
Quote:
Originally Posted by deadserious
Quote:
Originally Posted by -RJ-
Ideally, it should be able to handle all types of domains, including .co.uk and URLS that contain uppercase letters (http://WWW.NamePros.com/ returns namepros.com)
Even subdomains that are not second or or third level domain names? So http://sub.sub2.sub3.sub4.sub5.net would be okay? Or are you looking for it to only match real domains?
For my purposes, I would want it to retun the actual second level domain and strip the subdomains. So your example would return sub5.net

I can't quite vouch for the latest version of Polur's scripts as I haven't tested it out yet. At the time I needed it, I was able to fill my need a function based off an earlier version and used it with an existing function I had to trim subdomains, which worked fine!

When I get a chance, I'll try out the new stuff and see what performs best.
RJ is offline  
Old 11-01-2004, 12:59 AM   #34 (permalink)
₪NamePros Elite™
 
PolurNET's Avatar
 
Join Date: Jul 2004
Location: Kingston, Canada
Posts: 2,963
365.30 NP$ (Donate)

PolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant future

Alzheimer's Cancer Survivorship Third World Education Autism Save a Life Cystic Fibrosis Parkinson's Disease Lou Gehrig's Disease (ALS) Autism Multiple Sclerosis SIDS
Based on your requests RJ for a script that recognizes ccTLDs (such as ".co.uk" or ".cc1.cc2.com", etc.) the final versions of the scripts were designed.

deadserious here alleges that my first versions of the script do not output exactly what was described. Although it was tested at time of release, a few bugs did appear, which were identified by ezimedia, when using subdomains.

The reason for the three initial versions are simply due to differences in coding, however, the latest one I posted satisfies for RJ's purposes at least, the subdomain removal feature, ccTLDs, $_SERVER variables and everything else as described.

If you still allege that the code I posted is just a copy of php.net, I suggest you get a pair of proper reading glasses with a focal point that actually helps your nearpoint... if I did find one on php.net, I would've obviously stated so clearly, I have no benefit of posting unoriginal code. Indeed I still can't find the place you refer to @ php.net that contains my code. Also, if you also allege I prevented anyone from posting their codes here, well I'll be ****** ! I simply met the coding needs of the original poster, and improved on my version. Your posts seem to be oblivious of this fact, and just repeat the same facts and not one piece of original code that actually was developed by you is posted. Not that it's wrong, it's simply the fact your whining isn't helping the original poster nor solving the script problem(s), if any.

If you believe calling scripts final versions, yet some people who report some minor bug fixes would suddenly discredit the script and say it's "crap", that's the predicament IMO. Bugfixes & improvements are always happening on good products. I just wanted to help people, and did successfully, I really don't know your aim

Okay, signing out.
__________________
•• PolurNET Communications •• Avoid the Freeze, Enjoy the Breeze!
= A very special day, February 12th =
Proudly #1 on NamePros and WebHostingJury for over 3 years!
||LawPoint.org •• GREAT UK HOSTING DEALS NOW AT: ExcellentHost.com ••

Last edited by PolurNET; 11-01-2004 at 01:03 AM.
PolurNET is offline  
Old 11-01-2004, 05:49 AM   #35 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


Cool, here's some more new stuff. It probably needs some adjustments and such, but I think it at least "almost" works. You would just need to add/remove the second level domains that you want to be matched. Of course it could be made so you could add/remove these through a form or something, but this is just an example of how or "if" it even functions for now.
PHP Code:
<?php

function getdomain($url) {

$url = strtolower($url);

$slds =
    
'\.co\.uk|\.me\.uk|\.net\.uk|\.org\.uk|\.sch\.uk|
    \.ac\.uk|\.gov\.uk|\.nhs\.uk|\.police\.uk|
    \.mod\.uk|\.asn\.au|\.com\.au|\.net\.au|\.id\.au|
    \.org\.au|\.edu\.au|\.gov\.au|\.csiro\.au'
;

    
preg_match (
        
"/^(http:\/\/|https:\/\/|)[a-zA-Z-]([^\/]+)/i",
        
$url, $matches
    
);

    
$host = $matches[2];

    if (
preg_match("/$slds$/", $host, $matches)) {
        
preg_match (
            
"/[^\.\/]+\.[^\.\/]+\.[^\.\/]+$/",
            
$host, $matches
        
);
    }
    else {
        
preg_match (
            
"/[^\.\/]+\.[^\.\/]+$/",
            
$host, $matches
        
);
    }
    return
"{$matches[0]}";
}

$url1 = "http://WWW.NAMEPROS.COM/showthread.php?t=53456";
$url2 = "https://www.direct.gov.uk/Homepage/fs/en";    
$url3 = "http://horribly.long.subdomains.file.net/index.php";
$url4 = "http://66.98.205.16/tester";  # just for fun
$url5 = "http://WWW.somedomain.pros.com.au/dir/file.html";
$url6 = "https://www.www2.hosting.org.uk/home/index.php?file=1";    
$url7 = "http://sub.sub2.sub3.sub4.cars.com.au/index.php";
$url8 = "http://66.227.205.43/files/index.pl";  # just for fun2
$url9 = "http://WWW.BIGDOMAIN.co.uk/long/file/dir/path/enter.htm";
$url10 = "https://www.er.doctors.net.uk/";    
$url11 = "http://number.2.3.4.711.com/";
$url12 = "http://66.98.205.16/tester/ip.a/files";  # just for fun3   

echo "<br>url: $url1 <Br>domain: ".getdomain($url1)."<br>";
echo
"<br>url: $url2 <Br>domain: ".getdomain($url2)."<br>";
echo
"<br>url: $url3 <Br>domain: ".getdomain($url3)."<br>";
echo
"<br>url: $url4 <Br>domain: ".getdomain($url4)."<br>";
echo
"<br>url: $url5 <Br>domain: ".getdomain($url5)."<br>";
echo
"<br>url: $url6 <Br>domain: ".getdomain($url6)."<br>";
echo
"<br>url: $url7 <Br>domain: ".getdomain($url7)."<br>";
echo
"<br>url: $url8 <Br>domain: ".getdomain($url8)."<br>";
echo
"<br>url: $url9 <Br>domain: ".getdomain($url9)."<br>";
echo
"<br>url: $url10 <Br>domain: ".getdomain($url10)."<br>";
echo
"<br>url: $url11 <Br>domain: ".getdomain($url11)."<br>";
echo
"<br>url: $url12 <Br>domain: ".getdomain($url12)."<br>";
?>
The current results from the above example url's, so you can get an idea, I think would look something like this:

url: http://horribly.long.subdomains.file.net/index.php
domain: file.net

url: http://66.98.205.16/tester
domain:

url: http://WWW.somedomain.pros.com.au/dir/file.html
domain: pros.com.au

url: https://www.www2.hosting.org.uk/home/index.php?file=1
domain: hosting.org.uk

url: http://sub.sub2.sub3.sub4.cars.com.au/index.php
domain: cars.com.au

url: http://66.227.205.43/files/index.pl
domain:

url: http://WWW.BIGDOMAIN.co.uk/long/file/dir/path/enter.htm
domain: bigdomain.co.uk

url: https://www.er.doctors.net.uk/
domain: doctors.net.uk

url: http://number.2.3.4.711.com/
domain: 711.com

url: http://66.98.205.16/tester/ip.a/files
domain:

Last edited by deadserious; 11-01-2004 at 07:39 AM.
deadserious is offline  
Old 11-01-2004, 05:56 AM   #36 (permalink)
Man from Manila
 
armstrong's Avatar
 
Join Date: Jul 2003
Location: The Net
Posts: 6,840
701.50 NP$ (Donate)

armstrong has much to be proud ofarmstrong has much to be proud ofarmstrong has much to be proud ofarmstrong has much to be proud ofarmstrong has much to be proud ofarmstrong has much to be proud ofarmstrong has much to be proud ofarmstrong has much to be proud of

Autism Special Olympics
What will be the result for http://domain.com.keyword.net/index.php ? Will it correctly return keyword.net ?
armstrong is offline  
Old 11-01-2004, 06:03 AM   #37 (permalink)
Senior Member
 
Join Date: Aug 2002
Posts: 1,300
2.85 NP$ (Donate)

deadserious has a spectacular aura aboutdeadserious has a spectacular aura about


Quote:
Originally Posted by armstrong
What will be the result for http://domain.com.keyword.net/index.php ? Will it correctly return keyword.net ?
Yep it does return "keyword.net"
deadserious is offline  
Old 11-01-2004, 09:00 AM   #38 (permalink)
₪NamePros Elite™
 
PolurNET's Avatar
 
Join Date: Jul 2004
Location: Kingston, Canada
Posts: 2,963
365.30 NP$ (Donate)

PolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant futurePolurNET has a brilliant future

Alzheimer's Cancer Survivorship Third World Education Autism Save a Life Cystic Fibrosis Parkinson's Disease Lou Gehrig's Disease (ALS) Autism Multiple Sclerosis SIDS
Quote:
Originally Posted by armstrong
What will be the result for http://domain.com.keyword.net/index.php ? Will it correctly return keyword.net ?
Works with the versions I posted too, you can input subdirectories, $_SERVER vars etc. And the advantage is, IMHO, the script does NOT need to know all the ccTLDs that exist, but instead calculates that info itself. But it depends exactly what the use is for; in mine, you'll need to input if the incoming URL is a subdomain or not (just one more switch when calling function), as it already automatically verifies the "www" presence, and doesn't need to know what kind of domain extensions are present.

Anyway, Peace,
Anand
__________________
•• PolurNET Communications •• Avoid the Freeze, Enjoy the Breeze!
= A very special day, February 12th =
Proudly #1 on NamePros and WebHostingJury for over 3 years!
||LawPoint.org •• GREAT UK HOSTING DEALS NOW AT: ExcellentHost.com ••

Last edited by PolurNET; 11-01-2004 at 09:12 AM.
PolurNET is offline  
Old 11-01-2004, 09:28 AM   #39 (permalink)
Senior Member
 
ezimedia's Avatar
 
Join Date: Dec 2003
Posts: 2,105
13.66 NP$ (Donate)

ezimedia has much to be proud ofezimedia has much to be proud ofezimedia has much to be proud ofezimedia has much to be proud ofezimedia has much to be proud ofezimedia has much to be proud ofezimedia has much to be proud ofezimedia has much to be proud ofezimedia has much to be proud ofezimedia has much to be proud of


HI Anand

I can say your code worked fine for me and you replied to my post quickly with a fix and I got your code to do what I wanted it to and that is all I was worried about.

And I am sure if some one else could not have gotten your code to work you would have been more then happy to help them out also.

I don't really think knocking each other about whos code is better really matters.. Or does it... Well at least not to me

Keep up the good work anyways,

Thanks
Tom Dahne
ezimedia is offline  
Old 11-01-2004, 12:33 PM   #40 (permalink)
RJ
NamePros Founder

Administrator

 
Join Date: Feb 2003
Location: Bay Area, CA
Posts: 13,173
97,201.68 NP$ (Donate)

RJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatnessRJ Has achieved greatness

Find Marrow Donors! Cystic Fibrosis
ds's getdomain funciton

Code:
getdomain results:
url: http://WWW.NAMEPROS.COM/showthread.php?t=53456 
domain: namepros.com

url: https://www.direct.gov.uk/Homepage/fs/en 
domain: direct.gov.uk

url: http://horribly.long.subdomains.file.net/index.php 
domain: file.net

url: http://66.98.205.16/tester 
domain: 

url: http://WWW.somedomain.pros.com.au/dir/file.html 
domain: pros.com.au

url: https://www.www2.hosting.org.uk/home/index.php?file=1 
domain: hosting.org.uk

url: http://sub.sub2.sub3.sub4.cars.com.au/index.php 
domain: cars.com.au

url: http://66.227.205.43/files/index.pl 
domain: 

url: http://WWW.BIGDOMAIN.co.uk/long/file/dir/path/enter.htm 
domain: bigdomain.co.uk

url: https://www.er.doctors.net.uk/ 
domain: doctors.net.uk

url: http://number.2.3.4.711.com/ 
domain: 711.com

url: http://66.98.205.16/tester/ip.a/files 
domain:
Polur version test

Code:
parse_url_domain results:
url: http://WWW.NAMEPROS.COM/showthread.php?t=53456 
domain: namepros.com

url: https://www.direct.gov.uk/Homepage/fs/en 
domain: direct.gov.uk

url: http://horribly.long.subdomains.file.net/index.php 
domain: horribly.long.subdomains.file.net

url: http://66.98.205.16/tester 
domain: 66.98.205.16

url: http://WWW.somedomain.pros.com.au/dir/file.html 
domain: somedomain.pros.com.au

url: https://www.www2.hosting.org.uk/home/index.php?file=1 
domain: www2.hosting.org.uk

url: http://sub.sub2.sub3.sub4.cars.com.au/index.php 
domain: sub.sub2.sub3.sub4.cars.com.au

url: http://66.227.205.43/files/index.pl 
domain: 66.227.205.43

url: http://WWW.BIGDOMAIN.co.uk/long/file/dir/path/enter.htm 
domain: bigdomain.co.uk

url: https://www.er.doctors.net.uk/ 
domain: er.doctors.net.uk

url: http://number.2.3.4.711.com/ 
domain: number.2.3.4.711.com

url: http://66.98.205.16/tester/ip.a/files 
domain: 66.98.205.16
polur, w/ subdomain=true
Code:
parse_url_domain results:
url: http://WWW.NAMEPROS.COM/showthread.php?t=53456 
domain: com

url: https://www.direct.gov.uk/Homepage/fs/en 
domain: gov.uk

url: http://horribly.long.subdomains.file.net/index.php 
domain: long.subdomains.file.net

url: http://66.98.205.16/tester 
domain: 98.205.16

url: http://WWW.somedomain.pros.com.au/dir/file.html 
domain: pros.com.au

url: https://www.www2.hosting.org.uk/home/index.php?file=1 
domain: hosting.org.uk

url: http://sub.sub2.sub3.sub4.cars.com.au/index.php 
domain: sub2.sub3.sub4.cars.com.au

url: http://66.227.205.43/files/index.pl 
domain: 227.205.43

url: http://WWW.BIGDOMAIN.co.uk/long/file/dir/path/enter.htm 
domain: co.uk

url: https://www.er.doctors.net.uk/ 
domain: doctors.net.uk

url: http://number.2.3.4.711.com/ 
domain: 2.3.4.711.com

url: http://66.98.205.16/tester/ip.a/files 
domain: 98.205.16
RJ is offline  
Old 11-07-2004, 11:03 PM   #41 (permalink)
New Member
 
Join Date: Nov 2004
Posts: 3
6.00 NP$ (Donate)

boldlygoing is an unknown quantity at this point


Red face You blokes are a riot :O

Now that was a lively thread! Good to see that it didn't get too personal

Say, what would have to be added to these scripts if one wanted to pull out just the domain name itself, separate from the TLD? For instance,

Code:
http://www.domain_name.com
             and I want to pull out "domain_name" 
Is this possible, to just get that domain name alone? I would think it is, but my head is not filled with nearly enough knowledge like some of the guru's here. I did read some stuff on the "explode();" function, but it's all a bit beyond me.

Thanks for the time on this. Looking forward to getting a response.

James.
boldlygoing is offline  
Old 11-11-2004, 12:07 PM   #42 (permalink)
New Member
 
Join Date: Nov 2004
Posts: 3
6.00 NP$ (Donate)

boldlygoing is an unknown quantity at this point


Bump...

Bump

Anybody?

Thanks.
boldlygoing is offline  
Old 11-11-2004, 12:31 PM   #43 (permalink)
NamePros Regular
 
CreativeLogic's Avatar
 
Join Date: Sep 2003
Posts: 894
138.00 NP$ (Donate)

CreativeLogic has a spectacular aura aboutCreativeLogic has a spectacular aura about


All you'd have to do is use the working function they have above. Once you do that you can use explode or split I perfer split for some reason. But just put this line in somewhere:
list($domain, $extention) = split('[.]', $fulldomain);

I believe you have to have the . in square brackets or do something special but I forget right now and I don't have time to test it out.
__________________
Online Time Tracking :)
CreativeLogic is offline  
Old 11-12-2004, 07:45 AM   #44 (permalink)
New Member
 
Join Date: Nov 2004
Posts: 3
6.00 NP$ (Donate)

boldlygoing is an unknown quantity at this point


Cool, Thanks

Cool. Thanks for the direction. I'll give it a shot later today when I have some time as well. If I get it to do what I'd like, I'll be sure to post what I get back up here.

Thanks again.

JDK.
boldlygoing is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 03:29 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85