3 require_once("boot.php");
4 require_once('include/Scrape.php');
6 function gprobe_run($argv, $argc){
14 @include(".htconfig.php");
15 require_once("dba.php");
16 $db = new dba($db_host, $db_user, $db_pass, $db_data);
17 unset($db_host, $db_user, $db_pass, $db_data);
20 require_once('include/session.php');
21 require_once('include/datetime.php');
23 load_config('config');
24 load_config('system');
26 $a->set_baseurl(get_config('system','url'));
33 $url = hex2bin($argv[1]);
35 $r = q("select * from gcontact where nurl = '%s' limit 1",
36 dbesc(normalise_link($url))
41 $arr = probe_url($url);
42 if(count($arr) && x($arr,'network') && $arr['network'] === NETWORK_DFRN) {
43 q("insert into `gcontact` (`name`,`url`,`nurl`,`photo`)
44 values ( '%s', '%s', '%s', '%s') ",
47 dbesc(normalise_link($arr['url'])),
51 $r = q("select * from gcontact where nurl = '%s' limit 1",
52 dbesc(normalise_link($url))
56 poco_load(0,0,$r[0]['id'], str_replace('/profile/','/poco/',$r[0]['url']));
61 if (array_search(__file__,get_included_files())===0){
62 gprobe_run($argv,$argc);