Hello, I have created a link submission form and would like to add a reciprocal field into it to check if the user has added my link to their site before they submit their link. One thing I'm not to sure on is how to do this, I have tried to find a tutorial on this but I have not had any luck so far, I would be very greatful if anyone could help me or knows of this kind of tut. Thank You.
maybe take the url of where he said he added ur site , make a preg_match to see if in the source code of that page ur url is there ...
$your_website_link = "http://www.mysite.com"; // ask the user for the URL where he placed your link $link_url = $_REQUEST['link_url']; // grab the raw html for the page he said the link is on $his_site_data = file_get_contents($link_url); if(preg_match("/href=['\"]?".preg_quote($your_website_link,"/")."/",$his_site_data)){ // the link exists }else{ // couldn't find the link, maybe mark it for manual investigation, as the above pattern recognition may fail in some cases } PHP: