forked from kingarthur2/superfecta-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource-Paginasblancas_AR.module
31 lines (23 loc) · 1.06 KB
/
source-Paginasblancas_AR.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**** **** **** **** **** ****
Development notes:
Previous versions of this module would check for valid Argentina number format by using:
$this->IsValidNumber('AR', $this->thenumber, $areacode, $number2, $number3)
but this did not appear to be working properly and requires maintenance of the AR area code list. This check
abandoned on July 29, 2013
Change log:
July 29, 2013 - remove valid number check, update URL and update regex
**** **** **** **** **** ****/
class Paginasblancas_AR extends superfecta_base {
public $description = "Searches Argentina http://www.paginasblancas.com.ar/ <br>CID must include area code with the leading 0.";
public $version_requirement = "2.11";
function get_caller_id($thenumber, $run_param=array()) {
$this->DebugPrint("Searching www.paginasblancas.com.ar for number: $thenumber");
$url = "http://www.paginasblancas.com.ar/Telefono/".$thenumber;
$pattern = "/<h2 class=\"advertise-name\">(.*)<\/h2>/";
if ($this->SearchURL($url, $pattern, $match)) {
$caller_id = $this->ExtractMatch($match);
}
return($caller_id);
}
}