redarrow Posted September 1, 2006 Share Posted September 1, 2006 This code i love i worked it all out but how does one get to seach for a specific email on a website thank you.advance thank you.i tried for 6 hours last week no joy.search_for_url.php[code]//<?php //$your_link="http://www.what_ever.co.uk";//$remote_url="http://www.what_ever";//$match_pattern = preg_quote(rtrim($your_link, "/"), "/"); //if ($handle = @fopen($remote_url, "r")) { //while (!feof($handle)) { //$part = fread($handle, 1024); //if (preg_match("/<a(.*)href=[\"']".$match_pattern. //"(\/?)[\"'](.*)>(.*)<\/a>/", $part)) { //echo "links there"; //}// }//fclose($handle); //} else{//echo" no link sorry";//}//?>[/code] Link to comment https://forums.phpfreaks.com/topic/19308-search-website-for-email-address/ Share on other sites More sharing options...
trq Posted September 1, 2006 Share Posted September 1, 2006 Can you re-iterate the question please? Link to comment https://forums.phpfreaks.com/topic/19308-search-website-for-email-address/#findComment-83763 Share on other sites More sharing options...
coldkill Posted September 1, 2006 Share Posted September 1, 2006 Are you trying to search a specific page or a database table? If you are trying to search a page use fscanf maybe. If you are trying to search a database use a MySQL query which are quite simple to create. Cold Link to comment https://forums.phpfreaks.com/topic/19308-search-website-for-email-address/#findComment-83765 Share on other sites More sharing options...
redarrow Posted September 1, 2006 Author Share Posted September 1, 2006 As you can see from my code above i want the same thing but to search a email from an external site.if website.com got [email protected]. Link to comment https://forums.phpfreaks.com/topic/19308-search-website-for-email-address/#findComment-83768 Share on other sites More sharing options...
trq Posted September 1, 2006 Share Posted September 1, 2006 A few things.The code you have posted is commented out so does nothing.You have not elaberated on exactly what your problem is. Do you have a question or a specific problem? Link to comment https://forums.phpfreaks.com/topic/19308-search-website-for-email-address/#findComment-83770 Share on other sites More sharing options...
redarrow Posted September 1, 2006 Author Share Posted September 1, 2006 what please do i do to get this code to search for a email form external website.i tried but no joy.is there any way you no to help in this situation please thank you.[code]<?php $your_link="http://www.what_ever.co.uk";$remote_url="http://www.what_ever";$match_pattern = preg_quote(rtrim($your_link, "/"), "/"); if ($handle = @fopen($remote_url, "r")) { while (!feof($handle)) { $part = fread($handle, 1024); if (preg_match("/<a(.*)href=[\"']".$match_pattern. "(\/?)[\"'](.*)>(.*)<\/a>/", $part)) { echo "links there"; } }fclose($handle); } else{echo" no link sorry";}?>[/code] Link to comment https://forums.phpfreaks.com/topic/19308-search-website-for-email-address/#findComment-83771 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.