Hello all, I want to create a system that I will place in my admin where I go and check my partners Site that my website LINK is still there on his website or not . As on google search i found maximum ready made softwares for these purpose. Is there any particular tutorial or examples regarding these ? please suggest me , How these can be achieved using php. any suggestion will be appreciated. Thanks & Regards.
You could use file_get_contents() and specify the URL where the link should be located. The function returns a string. So, just search the string for your link.
Hello HorseGalleria , Thanks for your precious suggestion. on searching info about the function file_get_contents() suggested by you i found a function curl_init(); suggested in an article - http://eight7teen.com/articles/convert-your-file_get_contents-commands-to-curl/ using that a little bit my code works, but always message for No link exists, But actually the link already exists there on partners site . i think i am wrong at the point of my link matching in the code. anyway here is my few code : <?php //Initialize the Curl session $ch = curl_init(); //Create a variable with the URL you want to "get". $URL = "http://www.mypartnersite.com/linkpage/"; //Set curl to return the data instead of printing it to the browser. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set the URL curl_setopt($ch, CURLOPT_URL, $URL); //Execute the fetch $data_we_got = curl_exec($ch); $my_site = "http://www.mysitename.org/"; if(preg_match('#<a[^>]* href\s*=\s*("|\')'.preg_quote($my_site).'\1[^>]*>#i', $data_we_got)) { echo 'Yes, Link Exists .'; } else { echo 'No, Link does not exists .'; } //Close the connection curl_close($ch); ?> Code (markup): please help me to sort out the problem in these code as it always messages for Link does not exists , But actually the link exists there. Thanks & Regards.