get the URL with preg_match and fill in the button