details.php
changeset 22 52aaf1a838bd
parent 21 0bd6e7537154
child 23 7696ae981a3c
--- a/details.php	Fri Jun 18 15:36:31 2010 +0000
+++ b/details.php	Fri Jun 18 15:53:48 2010 +0000
@@ -78,8 +78,8 @@
                         {
 			$curr_reqID = $db_fieldcache["req_ID"];
 			$strip_url_val = remove_http($db_fieldcache['req_val']);
-			$http_proxy = "http://localhost:8080";
-			$command2 = "squidclient -m HEAD -p 8080 -u www-data -w www-data http://localhost/router_stage/{$db_fieldcache["req_ID"]}/$strip_url_val/?uid=$uid'&'sid1=$sid1'&'sid2=$sid2 |grep MISS |awk -F \" \" '{print $2}'";
+			$http_proxy = "http://village.n4c.eu/portal:8080";
+			$command2 = "squidclient -m HEAD -p 8080 -u www-data -w www-data http://village.n4c.eu/portal/router_stage/{$db_fieldcache["req_ID"]}/$strip_url_val/?uid=$uid'&'sid1=$sid1'&'sid2=$sid2 |grep MISS |awk -F \" \" '{print $2}'";
 			exec($command2, $cache_results);
 			echo $cache_results;
                         // find out if site is available and update the database
@@ -95,7 +95,7 @@
                                         $query_update = mysql_query("UPDATE responses_tbl SET req_response = '0' WHERE req_ID = '$curr_reqID'");
                                         $staging = "/data/www/private/HTMLrequester/staging/";
                                         $wget_options = "--dns-timeout=1 --proxy-user=www-data --proxy-password=www-data -N -r -l 3 --no-remove-listing -p --max-redirect 10 -t 1 -d";
-                                        $command1 = "wget -P $staging $wget_options http://localhost/router_stage/{$db_fieldcache["req_ID"]}/$strip_url_val/?uid=$uid'&'sid1=$sid1'&'sid2=$sid2";
+                                        $command1 = "wget -P $staging $wget_options http://village.n4c.eu/portal/router_stage/{$db_fieldcache["req_ID"]}/$strip_url_val/?uid=$uid'&'sid1=$sid1'&'sid2=$sid2";
                                        exec($command1, $wget_results);
 					}
 					else
@@ -265,9 +265,11 @@
 {
 
 #$data = http_get('http://...')
-#$response = http_get("'http://localhost:8080'. '/router_stage/' . $db_field['req_ID'] . '/' . remove_http($db_field['req_val'] . '?' . 'uid=' . $uid . '&'  . 'sid1=' . $sid1 . '&' . 'sid2=' . $sid2");
-print "<span class='result_output'><a href='". 'http://localhost'. '/router_stage/' . $db_field['req_ID'] . '/' . remove_http($db_field['req_val'] . '?' . 'uid=' . $uid . '&'  . 'sid1=' . $sid1 . '&' . 'sid2=' . $sid2) ."' target='_blank'>View website</a></span>";
-#print "<span class='result_output'><a href='". 'http://localhost:8080'. '/' . remove_http($db_field['req_val'] . '?' . 'uid=' . $uid . '&'  . 'sid1=' . $sid1 . '&' . 'sid2=' . $sid2) ."' target='_blank'>View website</a></span>";
+#$response = http_get("'http://village.n4c.eu/portal:8080'. '/router_stage/' . $db_field['req_ID'] . '/' . remove_http($db_field['req_val'] . '?' . 'uid=' . $uid . '&'  . 'sid1=' . $sid1 . '&' . 'sid2=' . $sid2");
+#print "<span class='result_output'><a href='". 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/router_stage/' . $db_field['req_ID'] . '/' . remove_http($db_field['req_val'] . '?' . 'uid=' . $uid . '&'  . 'sid1=' . $sid1 . '&' . 'sid2=' . $sid2) ."' target='_blank'>View website</a></span>";
+
+print "<span class='result_output'><a href='". 'http://village.n4c.eu/portal'. '/router_stage/' . $db_field['req_ID'] . '/' . remove_http($db_field['req_val'] . '?' . 'uid=' . $uid . '&'  . 'sid1=' . $sid1 . '&' . 'sid2=' . $sid2) ."' target='_blank'>View website</a></span>";
+#print "<span class='result_output'><a href='". 'http://village.n4c.eu/portal:8080'. '/' . remove_http($db_field['req_val'] . '?' . 'uid=' . $uid . '&'  . 'sid1=' . $sid1 . '&' . 'sid2=' . $sid2) ."' target='_blank'>View website</a></span>";
 
 #print "<span class='result_output'><a href='". $response ."' target='_blank'>View website</a></span>";