tm1000/Caller-ID-Superfecta — Issue #63: NummerChecker vs Gevonden
Author: jpenninkhof
Created: 2012-02-01 23:39:07+00:00
State: open

Unfortunately the nummerchecker service does not exist anymore. May I suggest to replace the nummerchecker service with gevonden.cc for lookup of Dutch numbers?

Please find the source code I'm using for a year or so below:

This data source requires Superfecta Module version 2.2.3 or higher.";
$source_param = array();

//run this if the script is running in the "get caller id" usage mode.
if($usage_mode == 'get caller id')
{
if($debug)
{
print 'Searching Gevonden.cc...
';
}
//NL 10

$loc_number = $thenumber;
$adddecode= false;

// Test for NL
if (strlen($loc_number) > 10)
{
if (substr($loc_number,0,2)=='31')
{
$loc_number = '0'.substr($loc_number,2);
}
else if (substr($loc_number,0,4)=='0031')
{
$loc_number = '0'.substr($loc_number,4);
}
else if (substr($loc_number,0,5)=='01131')
{
$loc_number = '0'.substr($loc_number,5);
}

}

if (strlen($loc_number) == 10)
{
$url = "http://www.gevonden.cc/telefoonnummer/" . $thenumber . "/lastname/";
$sresult = get_url_contents($url);

$expr = '=]*>(.*)[0-9]{5,}

=siU';
preg_match_all($expr, $sresult, $sname);
if (count($sname[1]) > 0)
{
$sname = trim($sname[1][0]);
}
else
{
$sname = "";
}

if ($sname != "")
{
$caller_id = strip_tags($sname);
}
else if($debug)
{
print "not found
\n";
}
} else if($debug)
{
print "only for the netherlands !!
\n";
}
}