WikiFile::uploadFromUrl PHP Method

uploadFromUrl() public method

$text is only used for the page contents of a new file, not an existing one (update that via WikiPage::setText()). If no $text is specified, $comment will be used as new page text.
public uploadFromUrl ( string $url, string $comment, string $text = null, boolean $overwrite = false ) : boolean
$url string The URL from which to upload
$comment string Upload comment for the file
$text string The article text for the file page
$overwrite boolean True to overwrite existing file
return boolean True if uploading was successful
    public function uploadFromUrl($url, $comment, $text = null, $overwrite = false)
    {
        // Collect upload parameter
        $params = array('url' => $url);
        // Upload URL to current file
        return $this->uploadCommon($params, $comment, $text, $overwrite);
    }