email validation

2008-02-12 03:00:00

<?php
/**
Verifies whether the given mail address exists.
@param mail the email address to verify
@return NULL if the address exists, as far as we could check.
an error message if we found a problem with the address
*/
function email_verify_check($mail) {
$host = substr(strchr($mail, '@'), 1);
if (!checkdnsrr($host, 'ANY')) {
return t('Email host %host does not seem valid', array('%host' => "$host"));
}
$mxHosts = array();
if (! getmxrr($host, $mxHosts)) {
$mxHosts[] = $host;
}

// Try to connect to one SMTP server
foreach ($mxHosts as $smtpServer) {

$connect = @fsockopen($smtpServer, 25, $errno, $errstr, 30);

if (!$connect) continue;

if (ereg("^220", $out = fgets($connect, 1024))) {
// OK, we have a SMTP connection
break;
} else {
echo("Could not verify email address at host $host: $out");
return;
}
}

if (! $connect)
return t('Email host %host does not seem valid, it does not answer', array('%host' => "$host"));

$from = "web@hotmail.com";

// Extract the <...> part if there is one
if (preg_match('/<(.*)>/', $from, $match) > 0) {
$from = $match[1];
}

$localhost = $_SERVER["HTTP_HOST"];
if (!$localhost) // Happens with HTTP/1.0
//should be good enough for RFC compliant SMTP servers
$localhost = 'localhost';

fputs($connect, "HELO $localhostrn");
$out = fgets($connect, 1024);
fputs($connect, "MAIL FROM: <$from>rn");
$from = fgets($connect, 1024);
fputs($connect, "RCPT TO: <{$mail}>rn");
$to = fgets($connect, 1024);
fputs($connect, "QUITrn");
fclose($connect);

if (!ereg ("^250", $from)) {
// Again, something went wrong before we could really test the address,
// be on the safe side and accept it.
echo ("Could not verify email address at host $host: $from");
return;
}

if (ereg("(Client host|Helo command) rejected", $to)) {
// This server does not like us, accept the email address
// (noos.fr behaves like this for instance)
echo("Could not verify email address at host $host: $to");
return;
}

if (!ereg ("^250", $to )) {
echo("Rejected email address: $mail. Reason: $to");
// return('Email address %mail does not seem valid', array('%mail' => "$mail"));
}

// Everything OK
echo "Valid email";
return;
}


email_verify_check("user@email.com");

?>


Category : PHP | 0 Comments | 0 Trackbacks

Simple IP block script

2008-01-24 14:17:50

Sometimes we need block some ip to access files here is a simple script to make this !
<?php
// HERE IS A IP LIST SEPARETED BY COMA
$__blockthis="127.0.0.3,127.0.0.1";
// HERE WE ADD ALL IPS IN ARRAY
$_ct=explode(",",$__blockthis);
// NOW WE CHECK IF CURRENT USER IP ARE IN ARRAY
if (in_array($_SERVER['REMOTE_ADDR'], $_ct))
      {
// YES THE IP ARE IN ARRAY WE DISPLAY A DIE  MESSAGE
    die("Sorry your ip has blocked ");
      }
?>
simple but work :)

Category : PHP | 0 Comments | 0 Trackbacks

simple solution to prevent remote files include!

2008-01-24 14:09:22

this is a simple solution to prevent remote files include if look :// in request url the script die is simple solution for this problem , sometimes remote files include make a big trouble!
add this line in top of your  php  file 
if (eregi("://", $_SERVER['REQUEST_URI'])){die("DIE BASTARD");}

Category : Security | 0 Comments | 0 Trackbacks

ASP NET Icons

2008-01-23 19:35:00

ASP NET Icons (www.aspneticons.com/)

Category : Free Icons | 0 Comments | 0 Trackbacks

Fam Fam Fam

2008-01-23 03:00:00

Fam Fam Fam (www.famfamfam.com/lab/icons/)
 

Category : Free Icons | 0 Comments | 0 Trackbacks

Fast Icons

2008-01-23 03:00:00

Fast Icons (www.fasticon.com/freeware/ )
 

Category : Free Icons | 0 Comments | 0 Trackbacks

Sweetie

2008-01-23 03:00:00

 Sweetie (www.sweetie.sublink.ca/)
 

Category : Free Icons | 0 Comments | 0 Trackbacks

Video Player / Video Podcasting

2008-01-23 03:00:00

Miro

Beautiful interface. Plays any video type (much more than windows media player). Subscribe to video RSS, download, and watch all in one. Torrent support. Search and download from YouTube and others.
Download Page

Category : Open Source Softwares | 0 Comments | 0 Trackbacks

Video Playback

2008-01-23 03:00:00

VLC

VLC

Plays more video files than most players: Quicktime, AVI, DIVX, OGG, and more. Pretty good interface.
Download Page


MPlayer

MPlayer

Similar to VLC-- plays loads of video formats.
Download Page


media player classic

Media Player Classic

Compact, but powerful media player. Plays anything under the sun. No install necessary.
Download Page


Category : Open Source Softwares | 0 Comments | 0 Trackbacks

"I'm Feeling Lucky" Spam Targets Goolge Taiwan

2008-01-06 12:41:41

It now looks like the "I'm Feeling Lucky" spammers have started using languages other than english, and are now using Google Taiwan ( Google 臺灣 ) to do their dirty work. Not only that but they are now using the inurl: parameter.

inurl:
If you include [inurl:] in your query, Google will restrict the results to documents containing that word in the url. For instance, [inurl:google search] will return documents that mention the word "google" in their url, and mention the word "search" anywhere in the document (url or no). Note there can be no space between the "inurl:" and the following word.

Putting "inurl:" in front of every word in your query is equivalent to putting "allinurl:" at the front of your query: [inurl:google inurl:search] is the same as [allinurl: google search].

inurl explanation source

The search phrase this time is: inurl:boyhad.com VDNS6管理系统

While I don't think it would be possible to hijack this search in an attempt to block it, it is still a good idea to keep record.

Also note that the phrases domain2find welcome to us, 立即boyhad登陆 turned up today as well.

UPDATE
Looks like not just Taiwan now. The same phrase in Traditional Chinese ( 繁體中文 ) is being used on Google from multiple countries.

Category : Spam | 0 Comments | 0 Trackbacks

1 | 2 | 3 | 4 next >>>>