getUri(); // we attach url_form only if this is a html response if(!is_html($response->headers->get('content-type'))){ return; } // this path would be relative to index.php that included it? $url_form = render_template("./templates/url_form.php", array( 'url' => $url )); $output = $response->getContent(); // does the html page contain
tag, if so insert our form right after tag starts $output = preg_replace('@