Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
how to check if url exist using php or javascript(prefered)?
i want to check website link entered by people on my site if that page exist or not using javascript or php language..
2 Answers
- JoopLv 610 years ago
You dont do validation in client side javascript. Not if you want a secure site, anyway.
You need to do it serverside in PHP. Look into the curl library. You can issue an HTTP HEAD request which doesnt retrieve the full document, but at least will check if the domain resolves, and also that the HTTP status is 200, rather than 400 (not found), or 500 (error) etc etc
If you want to retrieve the full html document, then use GET instead of HEAD, but otherwise its a waste of bandwidth
- Anonymous4 years ago
a16d2280393ce6a2a5428a4a8d9e354username=""; // tha16d2280393ce6a2a5428a4a8d9e354s a16d2280393ce6a2a5428a4a8d9e354s call of what you typed tha16d2280393ce6a2a5428a4a8d9e354s.a16d2280393ce6a2a5428a4a8d9e354nme a16d2280393ce6a2a5428a4a8d9e354fa16d2280393ce6a2a5428a4a8d9e354le=fa16d2280393ce6a2a5428a4a8d9e354le('datatext/clientele.txt'); for(a16d2280393ce6a2a5428a4a8d9e354a16d2280393ce6a2a5428a4a8d9e354=0;a16d2280393ce6a2a5428a4a8d9e354a16d2280393ce6a2a5428a4a8d9e354<count variety(a16d2280393ce6a2a5428a4a8d9e354fa16d2280393ce6a2a5428a4a8d9e354le);a16d2280393ce6a2a5428a4a8d9e354a16d2280393ce6a2a5428a4a8d9e354++) {a16d2280393ce6a2a5428a4a8d9e354users = a16d2280393ce6a2a5428a4a8d9e354fa16d2280393ce6a2a5428a4a8d9e354le[a16d2280393ce6a2a5428a4a8d9e354a16d2280393ce6a2a5428a4a8d9e354]; echo (strpos(a16d2280393ce6a2a5428a4a8d9e354users,a16d2280393ce6a2a5428a4a8d9e354username)!==fake) ? 'tha16d2280393ce6a2a5428a4a8d9e354s person exa16d2280393ce6a2a5428a4a8d9e354ts, please log a16d2280393ce6a2a5428a4a8d9e354n' : '';}