public static String getValueFromUrl ( String url , String preText , int length ) { String urlContents = getUrlContents ( url ) ; int indexOf = urlContents . indexOf ( preText ) ; if ( indexOf != - 1 ) { indexOf += preText . length ( ) ; String substring = urlContents . substring ( indexOf , indexOf + length ) ; return substring ; } return null ; }
Gets the value from url based on pre - text value from the response .