X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fwebserver%2Factions%2Fstep2.php;h=0d189aa03a61a1931d3fbf0f291b1d8c3c77c115;hb=HEAD;hp=81c39bddd5ad97a2c32c7e26ed2895fcd873c3e6;hpb=799f5e7006b49a5bc3fcd9154d24a9662ce3b782;p=privoxy.git diff --git a/doc/webserver/actions/step2.php b/doc/webserver/actions/step2.php index 81c39bdd..0d189aa0 100644 --- a/doc/webserver/actions/step2.php +++ b/doc/webserver/actions/step2.php @@ -1,507 +1,23 @@ - -
+ - - - -]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches); - - foreach (array_unique($matches[1]) as $image_link) - { - $result[] = link_to_absolute($url, $image_link); - } - - return count($result) ? $result : 0; -} - -/* - * Function: get_image_urls - * - * Purpose: If the page is a frameset, rerurn the image URLs from all - * its frame SRCes, else from the page itself. - */ -function get_image_urls($page, $url) -{ - - preg_match_all('|]*?src=[\'"]?(.*?)[\'" >]|i', $page, $matches); - - if (count($matches[1])) - { - foreach(array_unique($matches[1]) as $frame_link) - { - $framebuf = slurp_page(link_to_absolute($url, $frame_link)); - $result = array_merge($result, get_image_urls_sp($framebuf, link_to_absolute($url, $frame_link))); - } - } - else - { - $result = get_image_urls_sp($page, $url); - } - - return array_values(array_unique($result)); -} - - -/* - * Function: error_abort - * Purpose: Return an error page with $title and $message - */ -function error_abort($title, $message) -{ - if ($title == "invalid") /* shortcut */ - { - $title = "Invalid Feedback Submission"; - } - - echo ("Valid HTML 4.01 Transitional
- - \n"); - exit; -} - -/* - * Cannot start with step 2: - */ -if (!isset($referrer_url)) -{ - error_abort("invalid", "When submitting your feedback please start with - step 1."); -} - - -/* - * Cannot work on unknown problem: - */ -if (!isset($problem) || $problem == "INVALID") -{ - error_abort("invalid", "You need to select the nature of the problem in - step 1."); -} - - -/* - * If the protocol is missing from $referrer_url, prepend "http://" - */ -if (strncmp("http://", $referrer_url, 7)) -{ - $referrer_url = "http://" . $referrer_url; -} - - -/* - * Check if URL really exists and buffer its contents: - */ -if (($page = slurp_page($referrer_url)) == "FAILED") -{ - $url_confirm = " -Confirm the URL:
-- The URL that you entered could not be retrieved. Please make sure that -
-- $referrer_url -
-- is correct and publicly accssible. -
-- Yes, I'm sure. -
-Valid HTML 4.01 Transitional
- ++ If you want to report a problem, please + follow these instructions. +
++ Note that if your are reading this text, you are probably using an obsolete Privoxy version + and the problem may already be fixed in a more recent release. +