]> git.mxchange.org Git - friendica.git/blobdiff - include/gprobe.php
Added some more timestamp measuring
[friendica.git] / include / gprobe.php
index b4edbe4dba72466c9fec352f78bb4db9323040e3..52c5483c87c2ef213f114fb88b5aa38a33f69f3c 100644 (file)
@@ -4,16 +4,16 @@ require_once("boot.php");
 require_once('include/Scrape.php');
 require_once('include/socgraph.php');
 
-function gprobe_run($argv, $argc){
+function gprobe_run(&$argv, &$argc){
        global $a, $db;
 
        if(is_null($a)) {
                $a = new App;
        }
-  
+
        if(is_null($db)) {
            @include(".htconfig.php");
-       require_once("dba.php");
+       require_once("include/dba.php");
            $db = new dba($db_host, $db_user, $db_pass, $db_data);
        unset($db_host, $db_user, $db_pass, $db_data);
        };
@@ -33,13 +33,12 @@ function gprobe_run($argv, $argc){
 
        $url = hex2bin($argv[1]);
 
-       if(! validate_url($url))
-               return;
-
        $r = q("select * from gcontact where nurl = '%s' limit 1",
                dbesc(normalise_link($url))
        );
 
+       logger("gprobe start for ".normalise_link($url), LOGGER_DEBUG);
+
        if(! count($r)) {
 
                $arr = probe_url($url);
@@ -58,11 +57,12 @@ function gprobe_run($argv, $argc){
        }
        if(count($r))
                poco_load(0,0,$r[0]['id'], str_replace('/profile/','/poco/',$r[0]['url']));
-               
+
+       logger("gprobe end for ".normalise_link($url), LOGGER_DEBUG);
        return;
 }
 
 if (array_search(__file__,get_included_files())===0){
-  gprobe_run($argv,$argc);
+  gprobe_run($_SERVER["argv"],$_SERVER["argc"]);
   killme();
 }