Mailchimp import campaign content from .txt

I have the following code. It imports from a .txt file, some content, I want to send the content to maichimp and insert it into a campaign. How can I do it?

<?php
$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
if ($_FILES["fileToUpload"]["size"] > 500000) {
    echo "Sorry, your file is too large.";
    $uploadOk = 0;
}
// Allow certain file formats
if($imageFileType != "txt" ) {
    echo "Sorry, only txt files are allowed.";
    $uploadOk = 0;
}

    function formatQuotes($text) {
        $quoteStartTag = '<em>';
        $quoteEndTag = '</em>';

        $quotes = array('"','”');
        for ($i = 0; $i < count($quotes); $i++) {
            $currentQuote = $quotes[$i];
            $textParts = explode($currentQuote, $text);
            for ($j = 0; $j < count($textParts); $j++) {
                if (($j % 2) != 0)
                {
                    $textParts[$j] = $quoteStartTag . $quotes[$i] . $textParts[$j] . $quotes[$i] . $quoteEndTag;
                }
            }
            $text = implode("", $textParts);
        }
       return $text;
    }

   function extractText($fileName) {
        global $output;
        static $count = 1;
        $fileTitle = NULL;
        $fileDate = NULL;
        $fileBibleParagraph = NULL;
        $fileReference = NULL;
        $fileContent = NULL;
        $EMPTY_LINE_MARK = "{tomlinje}";
        $file = fopen($fileName, 'r') or exit("Unable to open file! : " . $fileName);
    $letters = array();
        while (!feof($file)) {
            $row = rtrim(fgets($file));
            if (!empty($row)) {
                if (strstr($row, $EMPTY_LINE_MARK))
                    $row = "";
                if (is_null($fileDate))
                    $fileDate = $row;
                else if (is_null($fileTitle))
                    $fileTitle = $row;
                else if (is_null($fileBibleParagraph))
                    $fileBibleParagraph = $row;
                else if (is_null($fileReference))
                    $fileReference = $row;
                else if (!empty($fileDate) && strtotime($row))
                {
                    $letters[] = array($fileTitle, $fileDate, $fileBibleParagraph, $fileContent, $fileReference);               
                $fileContent = formatQuotes($fileContent);
        if ((strlen($fileTitle) != 0) && (strlen($fileDate) != 0) && (strlen($fileContent) != 0))
                    $output .= $count . ". " . $fileTitle . " ->> Text successfully interpreted. <br>";
            else
                    exit($output . "<br><br><br><br>" . $count . ". " . $fileTitle . " ->> File could not be interpreted, check if it follows the default pattern!");
            $count++;               
                    $fileDate = $row;
                    $fileTitle = NULL;
                    $fileBibleParagraph = NULL;
                    $fileReference = NULL;
                        $fileContent = NULL;
                }
                else {              
                     $fileContent .= "<p>" . $row . "</p>";
                }
            }    
        }
        fclose($file);   
        return $letters;
    }


// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
    echo "Sorry, your file was not uploaded.";
// if everything is ok, try to upload file
} else {
    if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
        echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.";

        //$content = extractText($target_file);


        $contentArray2 = extractText($target_file);
        for ($i = 0; $i < count($contentArray2); $i++)
        {
            $contentArray = $contentArray2[$i];
            $title = $contentArray[0];
            $date = $contentArray[1];
            $BIBLEPARAGRAPH = $contentArray[2];
            $content = $contentArray[3];
            $REFERENCE = $contentArray[4];

        }



            $username = "does-not-matter";
            $password = "1d2bf05160324dc9cb326ec972eeca91-us8";

                $process = curl_init();
                //curl_setopt($process, CURLOPT_URL, "https://us8.api.mailchimp.com/3.0/campaigns"); 

                //curl_setopt($process, CURLOPT_URL, "https://us8.api.mailchimp.com/3.0/campaigns/2508101/content"); 

                curl_setopt($process, CURLOPT_URL, "https://us8.api.mailchimp.com/3.0/campaigns/4605a8b905/content"); 

                curl_setopt($process, CURLOPT_USERPWD, $username . ":" . $password);
                curl_setopt($process, CURLOPT_TIMEOUT, 30);
                curl_setopt($process, CURLOPT_HTTPHEADER, array( "content-type: application/json" ));
                curl_setopt($process, CURLOPT_POSTFIELDS, "{'html': 'https://us8.api.mailchimp.com/3.0/campaigns/4605a8b905/content'}");
                curl_setopt($process, CURLOPT_HEADER, TRUE);
                curl_setopt($process, CURLOPT_CUSTOMREQUEST, "POST");
                curl_setopt($process, CURLOPT_RETURNTRANSFER, true);


    )                   
                curl_close($process);

    } else {
        echo "Sorry, there was an error uploading your file.";
    }
}
?>

)