PHP code example of yesllc / dadjokes

1. Go to this page and download the library: Download yesllc/dadjokes library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yesllc / dadjokes example snippets

json
{
  "Joke": {
    "Opener": "What do you call a deer with no eyes?",
    "Punchline": "No idea!",
    "Processing Time": "0.000434"
  },
  "RequestEcho": {
    "Headers": {
      "Host": "somehost.com",
      "Connection": "keep-alive",
      "sec-ch-ua": "\"Chromium\";v=\"134\", \"Not:A-Brand\";v=\"24\", \"Google Chrome\";v=\"134\"",
      "sec-ch-ua-mobile": "?0",
      "sec-ch-ua-platform": "\"Windows\"",
      "DNT": "1",
      "Upgrade-Insecure-Requests": "1",
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
      "Accept-Encoding": "gzip, deflate, br, zstd",
      "Accept-Language": "en-US,en;q=0.9",
      "Cookie": "mycooking=myvalue;"
    },
    "Method": "GET",
    "Origin": "123.45.67.123",
    "URI": "/echo/abc/efg/",
    "Arguments": {
      "uri": "/echo/abc/efg/"
    },
    "Data": "",
    "URL": "https://somehost.com/echo/abc/efg/"
  },
  "DadJokesInfo": {
    "SourceCode": "https://github.com/yesinteractive/dadjokes",
    "Version": "20250315"
  }
}

FROM yesinteractive/dadjokes
RUN echo <your commands here>