This file belongs in
ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/
- $Id: step2.php,v 1.1 2002/03/30 03:20:30 oes Exp $
+ $Id: step2.php,v 1.4 2002/04/01 19:13:47 oes Exp $
$Log: step2.php,v $
+ Revision 1.4 2002/04/01 19:13:47 oes
+ Extended, fixed bugs, beefed up design, made IE-safe
+
Revision 1.1 2002/03/30 03:20:30 oes
Added Feedback mechanism for actions file
/*
* 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);
/*
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_FAILONERROR, 1);
-curl_setopt ($ch, CURLOPT_TIMEOUT, 15);
+curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
+curl_setopt ($ch, CURLOPT_TIMEOUT, 20);
ob_start();
$success = curl_exec ($ch);
</div>
<div class="box">
- <form action="<?php echo($base_url); ?>/step3.php" method="post">
+ <form action="step3.php" method="post">
<p>
<input type="hidden" name="problem" value="<?php echo ($problem) ?>">
<input type="hidden" name="referrer_url" value="<?php echo ($referrer_url) ?>">
* in a table for the user to select
*/
preg_match_all('|<img\s+[^>]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches);
- $count = count($matches[0]);
+ $image_urls = array_values(array_unique($matches[1]));
+ $count = count($image_urls);
+
if ($count > 0)
{
/*
*/
for ($i=0; $i< $count; $i++)
{
- $image_url = $matches[1][$i];
+ $image_url = $image_urls[$i];
/*
* Make image URLs absolute: