public function executeParseNyDonations($request) { $this->reference_form = new ReferenceForm(); if ($request->isMethod('post')) { $refParams = $request->getParameter('reference'); $url = $refParams['source']; $this->reference_form->bind($refParams); $commit = $request->getParameter('commit'); if (preg_match('/^http...www.elections.state.ny.us.8080.plsql_browser.*$/is', $url, $match)) { $browser = new sfWebBrowser(); if (!$browser->get($url)->responseIsError()) { $text = $browser->getResponseText(); $text = LsHtml::parseNyDonations($text); $this->parsed_text = $text; } } } }