Get list of Google Fonts
<p>I want to get list of google web fonts in select box to select a font. I am trying following function, but it gives the error.</p>

<p><strong>Code:</strong></p>

<pre><code>function get_google_fonts() {
    $url = "https://www.googleapis.com/webfonts/v1/webfonts?sort=alpha";
    $result = json_response( $url );
        $font_list = array();
        foreach ( $result-&gt;items as $font ) {
            $font_list[] .= $font-&gt;family;          
        }
        return $font_list;  
}

function json_response( $url )  {
    $raw = file_get_contents( $url, 0, null, null );
    $decoded = json_decode( $raw );
    return $decoded;
}
</code></pre>

<p><strong>Error:</strong>   </p>

<pre><code>Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP.
</code></pre>

<p>If I change the https to http, I get this error:</p>

<pre><code>file_get_contents(http://www.googleapis.com/webfonts/v1/webfonts?sort=alpha): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in
</code></pre>

<p>I guess this is because of PHP settings on my server, which I am unable to change. So, is there any alternative way to get the font list from Google? Thanks.</p>
