Git Product home page Git Product logo

deeply's Introduction

alt text

DeepLy 2

Build Status Version GitHub license Version

DeepL is a next-generation translation service. DeepLy is a dependency-free PHP library that implements a client to interact with the DeepL API using an API key. You can get an API key for free on their website. DeepLy automatically supports both the free and the pro API. For interactive demo scripts take a look at the demos folder.

Installation

This library requires PHP 8.0 or higher and the cURL extension. Install DeepLy trough Composer:

composer require chriskonnertz/deeply

Examples

$deepLy = new ChrisKonnertz\DeepLy\DeepLy('your-api-key');

$translatedText = $deepLy->translate('Hello world!', 'DE');
    
echo $translatedText; // Prints "Hallo Welt!"

💡 An interactive PHP demo script is included. It is located at demos/demo_translate.php.

Sophisticated Example

$deepLy = new ChrisKonnertz\DeepLy\DeepLy('your-api-key');

try {
    $translatedText = $deepLy->translate('Hello world!', DeepLy::LANG_EN, DeepLy::LANG_AUTO);
    
    echo $translatedText; // Prints "Hallo Welt!"
} catch (\Exception $exception) {
    echo $exception->getMessage();
}

Always wrap calls of the translate method in a try-catch-block, because they might throw an exception if the arguments are invalid or the API call fails. The exception will have an explanatory message and a specific error code.

Instead of using hardcoded strings as language arguments better use the language code constants of the DeepLy class. The class also offers methods such as getLangCodes($withAuto = true) and supportsLangCode($langCode).

If you need to specify advanced settings, use the setSettings() method: $deepLy->setSettings($glossaryId);

Auto-Detect Language

⚠️ ATTENTION: Using this method increases the usage statistics of your account!

DeepLy has a method that uses the DeepL API to detect the language of a text:

$languageCode = $deepLy->detectLanguage('Hello world!');

This will return 'EN'. The language of the text has to be one of the supported languages or the result will be incorrect. If you do not need the code of the language but its English name, you may call the $deepLy->getLangName($langCode) method.

The API, in general, can handle and completely translate texts that contain parts with different languages, if the language switch is not within a sentence. The detectLanguage() method will however only return the code of one language. It will throw an exception if it is unable to auto-detect the language. This will rarely happen, it is more likely that the API will return a "false positive": It will rather detect the wrong language than no language at all.

💡 An interactive PHP demo script is included. It is located at demos/demo_detect.

Supported Languages

DeepL(y) supports these languages:

Code Language Code Language
auto Auto detect KO Korean
ID Indonesian TR Turkish
IT Italian ZH Chinese
BG Bulgarian LT Lithuanian
CS Czech LV Latvian
DA Danish NB Norwegian
DE German NL Dutch
EL Greek PL Polish
EN English PT Portuguese
ES Spanish RO Romanian
ET Estonian RU Russian
FI Finnish SK Slovak
PT French SL Slovenian
HU Hungarian SV Swedish
JA Japanese

💡 Note that only the source language can be auto-detected.

Glossaries

To get a list with information about all your glossaries, do:

$glossaries = $deepLy->getGlossaries();
print_r($glossaries); // Prints an array with Glossary objects

Output:

Array
(
    [0] => ChrisKonnertz\DeepLy\Models\Glossary Object
        (
            [glossaryId] => 56cab399-ac8e-4a57-aadc-fa95103f2de5
            [entryCount] => 2
            ...
        )
    [2] => ChrisKonnertz\DeepLy\Models\Glossary Object
        (
            [glossaryId] => d9eb53b5-3929-49a1-b5e1-df1eb8be93c9
            [entryCount] => 5
            ...
        )
)

To get information about a specific glossary, do:

$glossary = $deepLy->getGlossary('your-glossary-id');
print_r($glossary); // Prints a \stdClass

Output:

ChrisKonnertz\DeepLy\Models\Glossary Object
(
    [glossaryId] => d9eb53b5-3929-49a1-b5e1-df1eb8be93c9
    [name] => DeepLy Test
    [ready] => 1
    [from] => en
    [to] => de
    [creationTimeIso] => 2022-04-21T17:46:31.83913+00:00
    [creationDateTime] => DateTime Object
    [entryCount] => 2
)

To get the translation entries of a specific glossary, do:

$entries = $deepLy->getGlossaryEntries('your-glossary-id');
print_r($entries);  // Prints an array with string items

Output:

Array
(
    [Entry 1 DE] => Entry 1 EN
    [Entry 2 DE] => Entry 2 EN
)

To create a new glossary with translation entries, do:

$glossary = $deepLy->createGlossary('test', 'de', 'en', ['Example DE' => 'Example EN']);

To delete an existing glossary, do:

$deepLy->deleteGlossary('your-glossary-id');

💡 An interactive PHP demo script is included. It is located at demos/demo_glossaries.php.

Documents

Translating documents consists of three steps. The first step is to upload a document:

$filename = __DIR__.'/test_document_original.pdf';
$result = $deepLy->uploadDocument($filename, 'DE');

var_dump($result);

Output:

ChrisKonnertz\DeepLy\Models\DocumentHandle Object
(
  [documentId] => D014F316B7A173079074BE76F530F846
  [documentKey] => 39FF8B10D20621096F23BF96CC103E12074727007C62963CF49AE8A9965D7695
)

💡 The maximum upload limit for any document is 10 MB and 1.000.000 characters.

⚡ Every file upload is at least billed with 50.000 characters!

The second step is to wait for the DeepL.com API to finish processing (translating) the document. You can check the state:

$result = $deepLy->getDocumentState($result->documentId, $result->documentKey);

var_dump($result);

Output:

ChrisKonnertz\DeepLy\Models\DocumentState Object
(
    [documentId] => D014F316B7A173079074BE76F530F846
    [status] => done
    [billedCharacters] => 50000
    [secondsRemaining] => null
)

In this case the document has been processed. This is indicated by "status" being "done" and "seconds_remaining" being null.

💡 The document life cycle is: queuedtranslatingdone (or error)

There are constants that you can use to check these values: DocumentState\STATUS_DONE etc.

The third step is to download the document:

$deepLy->downloadDocument($documentId, $documentKey, 'test_document_translated.pdf');

If you do not want to store the file, do:

$contents = $deepLy->downloadDocument($documentId, $documentKey);

⚡ A document can only be downloaded once!

💡 An interactive PHP demo script is included. It is located at demos/demo_documents.php.

Usage Statistic

To get usage statistics, do:

$usage = $deepLy->usage(); // Returns an object of type "Usage"

echo $usage->characterCount.'/'.$usage->characterLimit
    . ' characters ('.round($usage->characterQuota * 100).'%)';

Depending on the user account type, some usage types will be null. Learn more: https://www.deepl.com/de/docs-api/other-functions/monitoring-usage/

Framework Integration

DeepLy comes with support for Laravel 5.5+ and since it also supports package auto-discovery it will be auto-detected. However, you have to store your DeepL API key manually in the .env file, like this:

DEEPL_API_KEY = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Afterwards you can access DeepLy like this: $ping = \DeepLy::ping();

HTTP Client

Per default DeepLy uses a minimalistic HTTP client based on cURL. If you want to use a different HTTP client, such as Guzzle, create a class that implements the HttpClient\HttpClientInterface and makes use of the methods of the alternative HTTP client. Then use $deepLy->setHttpClient($yourHttpClient) to inject it.

💡 Note: If you experience issues with the integrated cURL client that could be solved by setting the CURLOPT_SSL_VERIFYPEER to false, first read this: snippets.webaware.com.au/../

If it does not help try: $deepLy->getHttpClient()->setSslVerifyPeer(false)

💡 You can set up a proxy with: $deepLy->getHttpClient()->setProxy('ip:port', 'user:password')

Tests

Export your API key:

export DEEPL_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Run composer install from the DeepLy directory, then run the tests:

./vendor/phpunit/phpunit/phpunit

Differences to V1

To upgrade from v1 to v2, make sure you specify the API key when instantiating the DeepLy object. Apart from the changes mentioned above your v1 code should still work with v2 as long as you did not write your own HTTP client or extended the DeepLy class with a custom class. To learn more about the changes, please take a look at the changelog.

Disclaimer

This is not an official package. It is 100% open source and non-commercial.

DeepL is a product of DeepL GmbH. More info: deepl.com/publisher.html

Notes

  • Texts have to be UTF8-encoded.

  • If you are looking for a real-world example application that uses DeepLy, you may take a look at Translation Factory.

  • The code of this library is formatted according to the code style defined by the
    PSR-2 standard.

  • Status of this repository: Maintained. Create an issue and you will get a response, usually within 48 hours.

deeply's People

Contributors

chriskonnertz avatar fbuchlak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deeply's Issues

Open DeepL Translator Pro using authentication (without login)

Hello Chriskonnertz,

This could be a general question.

Our organization wanna open a translator for all employees, therefore they want to keep the translator link in the intranet.

So once the user opens the translator page, he/she must open the page with DeepL Pro (without explicit login) - how can we achieve that? is there any automatic OAuth API provided by DeepL?

Thanks in advance.

Best regards.

English text gets translated to french

When I call $deepLy->translate($text, 'EN', 'DE') deepLy returns french text when the original text ist aready english or mixed english/german (I don't do language checks, because sometimes we have mixed language texts.

Test case:

$deepLy = new ChrisKonnertz\DeepLy\DeepLy();
echo $deepLy->translate("Doors: 8pm Father Sky Mother Earth has released two monumental meditative albums since the beginning in autumn 2016. „Across the River of Time“ is an atmospheric journey through your own universe. Dark, intense and ecstatic: The Drone Doom Duo let’s you forget space and time. MAENTIS ist eine Doom Sludge Band aus Hildesheim. Das 2015 gegründete Quartett (Alexander Seidel & Jan Gibron – Gitarre, Björn Behrens – Bass, Andy Krüßel – Schlagzeug + Stimme) lässt massive Klangwände mit kalter, klirrender Psychedelik verschmelzen: der Zuhörer verfängt sich in einem Sog der transzendentalen Dunkelheit. Das Debut-Album I HAVE TASTED DEVIL’S BLOOD wird als eines der besten instrumentalen Sludge/Doom-Veröffentlichungen 2016 angesehen.",'EN','DE');

This also happens when I set source language to auto or EN.

And it also happens when I pass english strings with auto source or EN as source:

$deepLy = new ChrisKonnertz\DeepLy\DeepLy();
echo $deepLy->translate("Thunder and lightning",'EN');
echo $deepLy->translate("Thunder and lightning",'EN','EN');

This leaves the short source string in english, but doesnt work for the mixed longer text above:

echo $deepLy->translate("Thunder and lightning",'EN','DE');

[TODO] Ideas

Ideas / ToDO

  • Implement the new stuff from https://www.deepl.com/api-reference.html
  • Somehow extract the text from HTML page responses of the server and add it to the text of the exception that we throw (state: done for integrated cURL client)
  • Add framework (Symfony) support
  • More / better tests (for example for the translateFile() method)
  • Do not just throw a pretty generic exception when the result of sentence splitting is empty (Update: may be difficult since we get a malformed generic error response from the API)

Done

  • Keep line breaks
  • Check if the detectLanguage method makes two API calls. If so: Is this necessary? (Update: Not necessary)
  • Add Guzzle tests
  • Rewrite the broken "proposals" test
  • Add translateSentencesmethod that directly translates sentences without splliting a text into sentences -> this means the additional API call is no longer necessary
  • Add framework (Laravel) support
  • Create Guzzle based class that implements HttpClientInterface
  • Refactored the cURL HttpClient classes
  • Throw an exception if text length is exceeded (but make the check optional)
  • Implement some kind of ping method (most likely not possible before more is known about the API)
  • Refactor Deeply::splitText method --> create a separate bag class

Rejected

  • Use browser language and set it as target language in the demo script
  • Add caching (maybe...)

Problem with translation

Hi,
I've a problem with the translations.
e.g if I translate the word "ciao" form italian to english, it still returns "ciao" . But if I translate "ciao amici miei" it's correct.

I'm using the latest version of your class.

Deepl Pro with your lib

Hello,

I was using your lib with deepl but now I have purchased DeepL Pro, will your code work with pro ? And can you please tell me where I can use Auth Key in your code ?

Thanks.

Feature: Multiple texts per request

The API supports the translation of multiple texts per request.

text array of string
Text to be translated. Only UTF-8-encoded plain text is supported.
The parameter may be specified up to 50 times in a single request.
Translations are returned in the same order as they are requested.

Would be usefull to have that possibility in deeply, too, otherwise it takes ages if you want to translate a ton of small texts.

it does not work with some sentences(?)

Sometimes it simply do not translate the text,
for example
With this sentence: "Diatec Trentino-Cucine Lube Civitanova (Play Off, Finale - gara 1)"
from IT to EN it works perfectly.

but if I translate this one " Trentino Diatec-Tours Vb (Andata di Finale di 2017 CEV Cup)"
it simply return the exact same sentence not translated.

Error in chriskonnertz/deeply/src/ChrisKonnertz/DeepLy/ResponseBag/TranslationBag.php

Note: not urgent, just trying it out.

$text = <<<EOS

The Center for American Progress puts it simply: “Americans work longer hours than workers in most other developed countries, including Japan, where there is a word, ‘karoshi’, for ‘death by overwork.’ The typical American middle-income family puts in an average of 11 more hours a week in 2006 than it did in 1979.” The end result is that we all live in a structurally toxic work world to use the title of an article written by Anne-Marie Slaughter, the author of “Unfinished Business: Women Men Work Family” published in 2015. The situation is bad for men and even worse for women. So what can we as individuals do about it without jeopardizing our job and reputation? Scott McDowell offers a useful starting point in a FastCompany article: Steps We Can All Take To Defy Our Culture Of Overwork:

If you are a boss, reduce your team’s hours.
Take your vacations.
Schedule free time.
Let your mind wander.
Stop talking how busy you are.

“In the past labor unions fought for worker sanity,” Scott McDowell adds. “In our current work culture we have to take individual responsibility for our well-being and for that of those around us. It’s time to alter the norms from within; our economy, health, productivity, and happiness depend on it.”
EOS;

$translatedText = $deepLy->translate($text, DeepLy::LANG_EN, DeepLy::LANG_FR);

Returns:

( ! ) Notice: Undefined offset: 0 in /var/www/html/libs/vendor/chriskonnertz/deeply/src/ChrisKonnertz/DeepLy/ResponseBag/TranslationBag.php on line 81
Call Stack

Time Memory Function Location

1 0.0006 367048 {main}( ) .../tryme.php:0
2 0.0103 1837440 ChrisKonnertz\DeepLy\DeepLy->translate( ) .../tryme.php:35
3 3.2932 1864856 ChrisKonnertz\DeepLy\ResponseBag\TranslationBag->getTranslation( ) .../DeepLy.php:239

( ! ) Notice: Trying to get property of non-object in /var/www/html/libs/vendor/chriskonnertz/deeply/src/ChrisKonnertz/DeepLy/ResponseBag/TranslationBag.php on line 87
Call Stack

Time Memory Function Location

1 0.0006 367048 {main}( ) .../tryme.php:0
2 0.0103 1837440 ChrisKonnertz\DeepLy\DeepLy->translate( ) .../tryme.php:35
3 3.2932 1864856 ChrisKonnertz\DeepLy\ResponseBag\TranslationBag->getTranslation( ) .../DeepLy.php:239
Le Center for American Progress le dit simplement:"Les Américains travaillent plus d'heures que les travailleurs dans la plupart des autres pays développés, y compris au Japon, où il y a un mot," karoshi ", pour" mort par surmenage "; la famille américaine typique à revenu moyen consacre en moyenne 11 heures de plus par semaine en 2006 qu'en 1979;" Le résultat final est que nous vivons tous dans un monde du travail structurellement toxique pour utiliser le titre d'un article écrit par Anne-Marie Sla ". La situation est mauvaise pour les hommes et pire encore pour les femmes. Que pouvons-nous donc faire, en tant qu'individus, pour y remédier sans mettre en péril notre travail et notre réputation? Prenez vos vacances. Prévoir du temps libre. Laisse ton esprit vagabonder. Arrête de dire à quel point tu es occupé. Dans le passé, les syndicats se sont battus pour la santé mentale des travailleurs ", ajoute Scott McDowell. Dans notre culture de travail actuelle, nous devons assumer la responsabilité individuelle de notre bien-être et de celui de ceux qui nous entourent. Il est temps de changer les normes de l'intérieur; notre économie, notre santé, notre productivité et notre bonheur en dépendent."

CurlHttpClient.php -> calllApi($url, array $payload, $method)

I'm doing my testing on a localhost machine using the demo_translate.php front end.
I've added a var_dump command at the end of the callApi function to help me understand the calls being made and how they are processed.

curl_close($curl);
var_dump($rawResponseData);
return $rawResponseData;

I am seeing a separate api call on every line input in the html text box. Even on empty lines.
I'm not a programmer by trade, not an api expert. I'm just wondering why so many calls like this? Can the entire text be sent as an array of lines with the 'to' and 'from' params set?

Update: At first it appeared like it might be something perhaps unintentional but appears the logic is as you have designed. I think just for my long term application I would try to split the text myself, if necessary and send the entire thing with one call.

Mod for miniAutoloader()

hi,

i add $class=str_replace('\', '/', $class); in your miniAutoloader-function ;)

kind regards,

andreas

Too many requests.

I'm getting a mistake: {"jsonrpc": "2.0","error":{"code":1042902,"message":"Too many requests."}}
But there is a working option:

<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://www2.deepl.com/jsonrpc');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"jsonrpc\":\"2.0\",\"method\": \"LMT_handle_jobs\",\"params\":{\"jobs\":[{\"kind\":\"default\",\"raw_en_sentence\":\"Too many requests.\",\"raw_en_context_before\":[],\"raw_en_context_after\":[],\"preferred_num_beams\":4}],\"lang\":{\"user_preferred_langs\":[\"DE\",\"ZH\",\"RU\",\"EN\"],\"source_lang_computed\":\"EN\",\"target_lang\":\"RU\"},\"priority\":1,\"commonJobParams\":{},\"timestamp\":1589020424674},\"id\":27440005}");
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');

$headers = array();
$headers[] = 'Authority: www2.deepl.com';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36';
$headers[] = 'Content-Type: text/plain';
$headers[] = 'Accept: */*';
$headers[] = 'Origin: https://www.deepl.com';
$headers[] = 'Sec-Fetch-Site: same-site';
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Sec-Fetch-Dest: empty';
$headers[] = 'Referer: https://www.deepl.com/translator';
$headers[] = 'Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6,zh;q=0.5';
$headers[] = 'Cookie: _ga=GA1.2.1530849196.1588933989; _gid=GA1.2.707299579.1588933989; LMTBID=067e4975-1add-4f13-8181-855b6f9d002c|6d2cbd1dedad11e5b2480e970569082c; _gat=1';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
print_r($result);

is there a way to fix the code?

You can do an update!

You can do an update! the code of Deepl has changed you can review and see if it can still be used to make an update !! Please!!

What after getting 429 error.

Hello,

I am getting 429 request limit error. After how many time I can re-request for translation. When this error gone ?

Api request limit

Hi Chris, just to let you know, the API is currently limited. I still have to figure out if they put a hard limit on the absolute request count from an IP or are just limiting the number of requests within a certain timespan.

One should not currently rely on the API for production use.

Error message: Server side error during DeepLy API call: HTTP code 429, message: "{"jsonrpc": "2.0","error":{"code":1042901,"message":"Too many requests."}}"

Always get 'Too many request'

Hi i use your plugin to translate my website, and I love it!

From time to time i get an error "Too many request", if I used the API to much. After some time it worked again.

But since today, I get it from the start...

Do you think they changed something, so that this plugin is not working anymore?

Best
Beat

crash on empty content

PHP Fatal error:  Uncaught exception 'ChrisKonnertz\DeepLy\ResponseBag\BagException' with message 'DeepLy API call resulted in a malformed result - beams array is empty in translation 0' in /home/developing/hn_bld/deepl/vendor/chriskonnertz/deeply/src/ChrisKonnertz/DeepLy/ResponseBag/TranslationBag.php:58
Stack trace:
#0 /home/developing/hn_bld/deepl/vendor/chriskonnertz/deeply/src/ChrisKonnertz/DeepLy/ResponseBag/AbstractBag.php(29): ChrisKonnertz\DeepLy\ResponseBag\TranslationBag->verifyResponseContent(Object(stdClass))
#1 /home/developing/hn_bld/deepl/vendor/chriskonnertz/deeply/src/ChrisKonnertz/DeepLy/DeepLy.php(279): ChrisKonnertz\DeepLy\ResponseBag\AbstractBag->__construct(Object(stdClass))
#2 /home/developing/hn_bld/deepl/vendor/chriskonnertz/deeply/src/ChrisKonnertz/DeepLy/DeepLy.php(299): ChrisKonnertz\DeepLy\DeepLy->requestTranslation('Kotlin/Native v...', 'PL', 'EN', false)
#3 /home/developing/hn_bld/bot.php(150): ChrisKonnertz\DeepLy\DeepLy->translate('Kotlin/Native v...', 'PL', 'EN')
#4 /home/developing/hn_bld/bo in /home/developing/hn_bld/deepl/vendor/chriskonnertz/deeply/src/ChrisKonnertz/DeepLy/ResponseBag/TranslationBag.php on line 58

Very complex your code

Nice but very granurality. over 10 class... 👎
Simply is Best.
One simply function.

$rta = translate('Hola todos, espero que hoy tengan un buen dia.'); print_r($rta);

`

function translate($text, $from='LANG_ES', $to='LANG_EN'){
$params =             ['lang'  => [ 'ser_preferred_langs' => ['LANG_ES', 'LANG_EN'], 'source_lang_user_selected' => 'LANG_ES', 'target_lang' => 'LANG_EN', ] ];
$params['jobs'][0] =  [ 'kind' => 'default', 'raw_en_sentence' => $text ];
$data = ['jsonrpc' => '2.0', 'method'  => 'LMT_handle_jobs', 'params'  => $params, 'id' => '2', ];
$data = json_encode($data);

$curl = curl_init('https://www.deepl.com/jsonrpc/');
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Content-Length: ' . strlen($data))  );
$rawResponseData = curl_exec($curl);
$rawResponseData = json_decode($rawResponseData);
     
return $rawResponseData;    
}`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.