Page 1 of 1

url test

Posted: Fri Dec 09, 2005 7:23 pm
by Luke
Is there a php function that tests whether a url resolves? That would be nice :)

Posted: Fri Dec 09, 2005 7:24 pm
by hawleyjr
Search the forum, this question has been asked dozens of times before...

:roll: :roll:

Posted: Fri Dec 09, 2005 7:27 pm
by Luke
can't find it.

Posted: Fri Dec 09, 2005 7:31 pm
by hawleyjr

Posted: Fri Dec 09, 2005 7:33 pm
by Luke
I used the search! I could not find it!!

I tried searching php.net and found that dns_check_record() and checkdnsrr() don't work on my system... and those were the closest to a solution I Could find.

Posted: Fri Dec 09, 2005 7:34 pm
by hawleyjr
The Ninja Space Goat you are smarter than that...

viewtopic.php?t=24724&highlight=url

Posted: Fri Dec 09, 2005 8:41 pm
by AKA Panama Jack
Or you could have spent less time pointing him in the right direction.

gethostbyname($url)

If it returns an IP address then it has a valid DNS entry out there. If it returns the URL instead of the IP then it doesn't have a valid DNS that can be found.

Posted: Sat Dec 10, 2005 9:54 am
by Luke
thank you panama jack for just telling me... I could have done this yesterday if hawkley would have done that. I appreciate it.

Posted: Sat Dec 10, 2005 12:00 pm
by John Cartwright
The Ninja Space Goat wrote:thank you panama jack for just telling me... I could have done this yesterday if hawkley would have done that. I appreciate it.
Were here to promote learning, not give you the answers. Thats like going to class and simply given the answer, not the methods of doing it. Simply typing in one search string and not getting answers is most often not sufficient, but by spending a little time researching rather than always relying on direct answers pays off.

Posted: Sat Dec 10, 2005 12:48 pm
by hawleyjr
Jcart wrote:
The Ninja Space Goat wrote:thank you panama jack for just telling me... I could have done this yesterday if hawkley would have done that. I appreciate it.
Were here to promote learning, not give you the answers. Thats like going to class and simply given the answer, not the methods of doing it. Simply typing in one search string and not getting answers is most often not sufficient, but by spending a little time researching rather than always relying on direct answers pays off.
Could have not said it better myself.

Posted: Sat Dec 10, 2005 1:52 pm
by AKA Panama Jack
Jcart wrote:
The Ninja Space Goat wrote:thank you panama jack for just telling me... I could have done this yesterday if hawkley would have done that. I appreciate it.
Were here to promote learning, not give you the answers. Thats like going to class and simply given the answer, not the methods of doing it. Simply typing in one search string and not getting answers is most often not sufficient, but by spending a little time researching rather than always relying on direct answers pays off.
You need to do both but if you KNOW the answer and post a response like "Use the search" and you are a MODERATOR then you come off as being well... an ass. Kind of like the school yard bully playing keepaway from the new kid.

I would think that moderators would be more helpful.

hawleyjr posted 3 messages with each one denigrating the person asking for help. He would have spent LESS time actually helping the person instead of trying to make him look bad. Every time I see some know-it-all post a "Search the forums" reply instead of actually HELPING the poor person I want to smack them upside the head.

I thought these forums were about helping each other and not about attitude. All The Ninja Space Goat got from hawleyjr was attitude and no real help. Plus the link hawleyjr posted in his final putdown message didn't even answer the guys original question.

I knew it because I have used that function before and use it with the Sever List page for my games website as one of the things used to verify that the information is coming from a valid website.

One post with the information would have been far better than three that would cause the person asking the question to wonder if using the site was worth the effort. Especially when the three non-helpful, semi-putdown replies came from a moderator.

Please be more respectful of the people who come here as they are what make the site.

Posted: Sat Dec 10, 2005 2:11 pm
by John Cartwright
I don't get it. By spending more than 30 seconds searching, the answer was jumping out on multiple locations. What is the point on simply giving the answer? What does that give the user -- depency of other people. What is other people do not know, do you simply give up?

By using key words of the OP in his post "url resolve" I found several discussions in this immediatly.
hawleyjr posted 3 messages with each one denigrating the person asking for help.
The first link posted by hawleyjr was the results of a search, unfortunantly the post data was not sent along. search.php?mode=results dictates that ea search was made, unknowingly did hawleyjr know the search results would not be shown, just the search page. Just a simple mistake, move on.

The next message answere exactly what the user needed, as well as several alternative methods, as well as more key words and a jump in the right direction of what is typically involved.
and you are a MODERATOR then you come off as being well... an ass. Kind of like the school yard bully playing keepaway from the new kid.
I, or any member of this community do not take kindly to personal attacks. Watch what you say. If you have a problem with I or another member contact any moderator via PM, not in public.

I stand by my decision.

Posted: Sat Dec 10, 2005 2:18 pm
by JayBird
I quote
Preamble to Forum rules wrote:This forum has had one major goal since it was created: To help people learn how to program PHP. That's it. That's the primary goal. Everything that is done here is based on making sure we are successful in achieving that goal.
notice the emphasis on learning

Posted: Sat Dec 10, 2005 2:46 pm
by patrikG
We have very clear guidelines in place:
twigletmac wrote:
  1. Try a search first - Google, the PHP manual, the MySQL manual, Phuse and this forum are all good resources.
source: viewtopic.php?t=8815 entitled: "Before Post Read: General Posting Guidelines"

Thread locked.

Posted: Sat Dec 10, 2005 8:09 pm
by Chris Corbyn
I have to say...we use forum software like phpBB because that means we can archive threads/problems and store them/search them.

I'm not saying the OP did not try this but I'm just pointing out that it often work to do a seach.

Side note: For the most flexibility in networking issues such as this fsockopen() often is the answer.....