forked from FreePBX/superfecta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/13.0' of github.com:POSSA/Caller-ID-Superfecta …
…into release/13.0 Conflicts: sources/source-GevondenCC_NL.module sources/source-Herold_Austria.module
- Loading branch information
Showing
8 changed files
with
207 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | ||
* Developer Notes: | ||
* | ||
* This DasTelefonBuch_Germany Source is looking up for persons companys. | ||
* | ||
* dastelefonbuch.de Terms of Service: | ||
* https://www.dastelefonbuch.de/Datenschutz | ||
* dastelefonbuch.de TOS do not explicitly prohibit automated lookups | ||
* dastelefonbuch.de manages Reverse Number lookups for their customers. Number Search works for all Customers, which dont contradict for this service. | ||
* | ||
* Version History: | ||
* 2017-03-21 Initial Module for DasTelefonBuch_Germany | ||
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***/ | ||
|
||
class DasTelefonBuch_Germany extends superfecta_base { | ||
|
||
public $description; | ||
public $version_requirement = "2.11"; | ||
|
||
public function __construct() { | ||
$this->description = "https://www.dastelefonbuch.de - "._("These listings include data for dastelefonbuch in Germany."); | ||
} | ||
|
||
function get_caller_id($thenumber, $run_param=array()) { | ||
$this->DebugPrint(_("Searching"). "https://www.dastelefonbuch.de ... "); | ||
|
||
if (substr($thenumber, 0, 1) ==! '0') { | ||
$thenumber=trim($thenumber,' '); | ||
$thenumber="00" . $thenumber; | ||
} | ||
if (substr($thenumber, 0, 2) === '00') { | ||
$thenumber=trim($thenumber,' '); | ||
} | ||
|
||
// Set the url we're searching for | ||
$res_rul = "https://www.dastelefonbuch.de/Suche/" . $thenumber;// url for searching persons | ||
|
||
// regex patterns to search for | ||
$regexp = array( | ||
'~<div class="name" title="(.+?)">~', | ||
); | ||
// search for persons match | ||
if ($this->SearchURL($res_rul, $regexp, $match)) { | ||
$caller_id = $this->ExtractMatch($match); | ||
} | ||
$caller_id = isset($caller_id)?$caller_id:''; | ||
|
||
return($caller_id); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** | ||
* Developer Notes: | ||
* | ||
* This TelefonABC Source is looking up for persons and some companys. Officially this module supports only Persons lookup but sometimes there alre also companys in the results. | ||
* | ||
* TelefonABC.at Terms of Service: | ||
* http://www.telefonabc.at/agb.aspx | ||
* TelefonABC.at TOS do not explicitly prohibit automated lookups | ||
* It is not allowed to save the looked up data into a Database and it is prohibited to use the Data for commercial use and adverts. | ||
* | ||
* Version History: | ||
* 2017-03-21 Initial Module for TelefonABC.at | ||
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***/ | ||
|
||
class TelefonABC_Austria extends superfecta_base { | ||
|
||
public $description; | ||
public $version_requirement = "2.11"; | ||
|
||
public function __construct() { | ||
$this->description = "http://www.telefonabc.at - "._("These listings include data for TelefonABC in Austria."); | ||
} | ||
|
||
function get_caller_id($thenumber, $run_param=array()) { | ||
$this->DebugPrint(_("Searching"). "http://www.telefonabc.at ... "); | ||
|
||
if (substr($thenumber, 0, 1) ==! '0') { | ||
$thenumber=trim($thenumber,' '); | ||
$thenumber="00" . $thenumber; | ||
} | ||
if (substr($thenumber, 0, 2) === '00') { | ||
$thenumber=trim($thenumber,' '); | ||
} | ||
|
||
// Set the url we're searching for | ||
$res_rul = "http://www.telefonabc.at/result.aspx?what=".$thenumber."&where=&exact=False&firstname=&lastname=&appendix=&branch=&p=0&sid=&did=&cc=";// url for searching persons | ||
|
||
// regex patterns to search for | ||
$regexp = array( | ||
'#<h3 itemprop="name" class="card-heading pull-left">(.+?)</h3>#s', | ||
); | ||
// search for persons match | ||
if ($this->SearchURL($res_rul, $regexp, $match)) { | ||
$caller_id = $this->ExtractMatch($match); | ||
} | ||
$caller_id = isset($caller_id)?$caller_id:''; | ||
|
||
return($caller_id); | ||
} | ||
|
||
} |