-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: CID Superfecta
-
Labels:None
-
ToDo:
-
Asterisk Version:all
-
Distro Version:all
I suggest to add an additional source module ot be available in the official distro.
the module is
source-PagineBianche_IT.module
<?php
class PagineBianche_IT extends superfecta_base {
public $description = "http://www.paginebianche.it - These listings include data from the Italian PagineBianche.";
public $version_requirement = "2.11";
function get_caller_id($thenumber, $run_param=array()) {
$thenumber = substr($thenumber,3);
$this->DebugPrint("Searching PagineBianche - {$thenumber} ... ");
$url = "http://www.paginebianche.it/ricerca-da-numero?qs={$thenumber}";
# $this->DebugPrint("{$url}");
if ($this->SearchURL($url, '=<h2.class\=\"rgs\"[^>]*>(.*)</h2>=siU' , $match)) {
$caller_id = $this->ExtractMatch($match);
# $this->DebugPrint("{$caller_id}");
if ($this->SearchURL($url, '=class\=\"locality\"*>(.*)</span>=siU', $match1))
$caller_id .= " - ";
$caller_id .= $this->ExtractMatch($match1);
# $caller_id .= " - {$thenumber}:";
# $caller_id .= $thenumber;
# $this->DebugPrint("{$caller_id}");
}
return($caller_id);
}
}