Check given link is real working
We see the most online enquiry ,guest books,help ticket system asks for the web address of the guest ,mostly of them are optional.i think in some case it required to given web address or page link really exists or not.Here we learn how to find the given link or url is really exists or it fake.For this we use simple fsocketopen function. we make a simple function that given below.It only check HTTP links.not HTTPS,FTP protocal urls. Remember the link parameter must be a valid web url address.we can do it with CURL php extension functions.but in case if it not available it won’t work. so given function is core PHP function.
1 2 3 4 5 | <?php function isRealLink($link){ return (boolean)@fsockopen($link, 80, $errno, $errstr, 30); } ?> |
Popularity: 10% [?]









Related Articles
1 user responded in this post
[...] This post was Twitted by maheshchari [...]
Leave A Reply