Genderize.io

FREE
By stromgren | Updated vor einem Monat | Data
Popularity

5.6 / 10

Latency

182ms

Service Level

100%

Health Check

100%

Back to All Discussions

unable to get response

Rapid account: Kvyadav
kvyadav
vor 10 Jahren

$ch = curl_init(“https://genderize.p.mashape.com/?country_id=US&language_id=en&name=peter”);

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_HTTPGET, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $output = curl_exec($ch);       
    curl_close($ch);
   $optarray=json_decode($output); 
   print_r($optarray);

this is my code but i am not getting output

Rapid account: Stromgren
stromgren Commented vor 9 Jahren

When using the API through Mashape, you’ll have to append your Mashape API key:

<pre><code>curl --get --include “https://genderize.p.mashape.com/?country_id=US&language_id=en&name=peter
-H “X-Mashape-Key: 2GwWV8tqXWmshjrC1HZE12AgbWpup10ifrrjsnbJilVdRCRGp0”</code></pre>
Or you can use the API directly. Refer to the documentation at http://genderize.io
Your URL would then look like this:

<pre><code>http://api.genderize.io?name=peter&country_id=US&language_id=en</code></pre>

Join in the discussion - add comment below:

Login / Signup to post new comments