3 require_once("boot.php");
4 require_once('include/Scrape.php');
5 require_once('include/socgraph.php');
7 function gprobe_run(&$argv, &$argc){
15 @include(".htconfig.php");
16 require_once("include/dba.php");
17 $db = new dba($db_host, $db_user, $db_pass, $db_data);
18 unset($db_host, $db_user, $db_pass, $db_data);
21 require_once('include/session.php');
22 require_once('include/datetime.php');
24 load_config('config');
25 load_config('system');
27 if ($hostname = get_config('system', 'hostname'))
28 $a->set_hostname($hostname);
30 $a->set_baseurl(get_config('system','url'));
37 $url = hex2bin($argv[1]);
39 $r = q("select * from gcontact where nurl = '%s' limit 1",
40 dbesc(normalise_link($url))
45 $arr = probe_url($url);
46 if(count($arr) && x($arr,'network') && $arr['network'] === NETWORK_DFRN) {
47 q("insert into `gcontact` (`name`,`url`,`nurl`,`photo`)
48 values ( '%s', '%s', '%s', '%s') ",
51 dbesc(normalise_link($arr['url'])),
55 $r = q("select * from gcontact where nurl = '%s' limit 1",
56 dbesc(normalise_link($url))
60 poco_load(0,0,$r[0]['id'], str_replace('/profile/','/poco/',$r[0]['url']));
65 if (array_search(__file__,get_included_files())===0){
66 gprobe_run($argv,$argc);