Question

Is it possible to point a domain name to my Google drive?

Was it helpful?

Solution

You could probably use readfile in PHP to do this. Here is the example they give:

<?php
    $file = 'monkey.gif';

    if (file_exists($file)) {
        header('Content-Description: File Transfer');
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename='.basename($file));
        header('Content-Transfer-Encoding: binary');
        header('Expires: 0');
        header('Cache-Control: must-revalidate');
        header('Pragma: public');
        header('Content-Length: ' . filesize($file));
        ob_clean();
        flush();
        readfile($file);
        exit;
    }
?>

Replace monkey.gif with the URL of the public file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top