Using SetGetGo’s Meaningful Random Word Generator API

setgetgo APIs that let you generate a meaningful random word. To use it in PHP just add a line of code

$str=file_get_contents("http://randomword.setgetgo.com/get.php");

If you want to trim the word and remove any spaces then add the following too

$str=str_replace(" ","",trim($str));

Here’s a sample code to generate a random word using PHP

function RandomWord() {
    var requestStr = "http://randomword.setgetgo.com/get.php";

    $.ajax({
        type: "GET",
        url: requestStr,
        dataType: "jsonp",
        jsonpCallback: 'RandomWordComplete'
    });
}

function RandomWordComplete(data) {
    alert(data.Word);
}

This content has been helpful to you?

Thanks for contributing!

Yes No