Jump to content


Photo

search website for email address


  • Please log in to reply
5 replies to this topic

#1 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 01 September 2006 - 12:13 AM


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
//<?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";

//}

//?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 01 September 2006 - 12:24 AM

Can you re-iterate the question please?

#3 coldkill

coldkill
  • Members
  • PipPipPip
  • Advanced Member
  • 159 posts
  • LocationUnited Kingdom

Posted 01 September 2006 - 12:25 AM

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


You can learn alot from reading the manual

#4 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 01 September 2006 - 12:33 AM

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 admin@whatever.com.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#5 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 01 September 2006 - 12:36 AM

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?

#6 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 01 September 2006 - 12:40 AM

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.
<?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";

}

?>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users