Question: I want to get some informations through github API, i tried to use file\_get\_contents and it does not seem to work, so i moved to cURL, it does not give an error but it's not returning anything

PHP code :

```
if (!empty($_POST["username"])) {
        $ch=curl_init();
        curl_setopt($ch, CURLOPT_URL, "https://api.github.com/users/".$_POST["username"]);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        $output=curl_exec($ch);
        print_r($output);
        curl_close($ch);
    }

```

I checked the http code with CURLINFO\_HTTP\_CODE and its set to 0. is there any fix that i can get the json data when requesting.

Answer: 
Why a script at all? This simple formula in I6 should do it:

```
=TRANSPOSE(SORT(SORTN(SEQUENCE(200),5,0,RANDARRAY(200),1)))

```
Are you able to import [randojs](https://randojs.com)? If so you can get an array of ordered unique random numbers from 1 to 200 easily like this:

```js
var sequence = randoSequence(1, 200).slice(0, 5).sort(function(a, b){return a-b});

console.log(sequence);
```

```html
<script src="https://randojs.com/1.0.0.js"></script>
```

So you could just change your `rollDice()` function to look like this:

```
function rollDice() {
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("sheet1 (New)");
  var sequence = randoSequence(1, 200).slice(0, 5).sort(function(a, b){return a-b});
  sheet.getRange("I6").setValue(sequence[0]);
  sheet.getRange("J6").setValue(sequence[1]);
  sheet.getRange("K6").setValue(sequence[2]);
  sheet.getRange("L6").setValue(sequence[3]);
  sheet.getRange("M6").setValue(sequence[4]);
}

```