From 3f1c58c1007431cb91537a50989c95adcdaecdc2 Mon Sep 17 00:00:00 2001 From: oes Date: Tue, 2 Apr 2002 07:22:19 +0000 Subject: [PATCH] Elimnating duplicate images; using relative link for step3 --- doc/webserver/actions/step2.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/webserver/actions/step2.php b/doc/webserver/actions/step2.php index 0a1d94f1..9020ffdb 100644 --- a/doc/webserver/actions/step2.php +++ b/doc/webserver/actions/step2.php @@ -101,12 +101,9 @@ /* * For testing: */ -$base_url = "http://www.oesterhelt.org/actions"; -//$base_url = "http://privoxy.org/actions"; -//$base_url = "http://localhost/actions"; //phpinfo(); -//error_reporting(E_NONE); -error_reporting(E_ALL); +//error_reporting(E_ALL); +error_reporting(E_NONE); /* @@ -220,7 +217,7 @@ switch($problem)
-
+

@@ -246,7 +243,9 @@ else * in a table for the user to select */ preg_match_all('|]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches); - $count = count($matches[0]); + $image_urls = array_values(array_unique($matches[1])); + $count = count($image_urls); + if ($count > 0) { /* @@ -283,7 +282,7 @@ else */ for ($i=0; $i< $count; $i++) { - $image_url = $matches[1][$i]; + $image_url = $image_urls[$i]; /* * Make image URLs absolute: -- 2.39.2