Created
July 28, 2016 01:40
-
-
Save Echocage/716750602f8039f1225044ad761dd05a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$regex = "/\"([^.+,.+$]+)\"/"; | |
$textEncode = urlencode("Hello world"); | |
$file = file_get_contents("https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=es&dt=t&q=$textEncode"); | |
echo " $file\n"; | |
$file = preg_match($regex, $file, $matches); | |
echo "matches: $matches[0]"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment