Wenn Sie wirklich nicht wollen use their API (was wie ein schlechter Ruf scheint, weil Sie keine Authentifizierung tun müssen, es ist vollständig geöffnet), können Sie einige einfache Hacks tun.
Ich erhalte keine Umleitungen von cURL
~ $ curl -v https://soundcloud.com/dengue/sets/nuevos-sonidos
* Trying 68.232.44.127...
* Connected to soundcloud.com (68.232.44.127) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
* Server certificate: *.soundcloud.com
* Server certificate: GlobalSign Domain Validation CA - SHA256 - G2
* Server certificate: GlobalSign Root CA
> GET /dengue/sets/nuevos-sonidos HTTP/1.1
> Host: soundcloud.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Cache-Control: private, max-age=0
< Content-Type: text/html
< Date: Sat, 07 May 2016 03:42:20 GMT
< Server: am/2
< Set-Cookie: sc_anonymous_id=363279-961735-991413-425081; path=/; expires=Tue, 05 May 2026 03:42:20 GMT; domain=.soundcloud.com
< Via: sssr
< X-Frame-Options: SAMEORIGIN
< Content-Length: 47003
<
Aber wenn Sie sind, haben Sie nur diese Option hinzufügen, bevor Sie die cURL von PHP machen:
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
Wenn Sie sind ernsthaft in das Hacking-Geschäft, warum Sie dies nicht nur tun:
<?php
$url = `curl -L https://soundcloud.com/dengue/sets/nuevos-sonidos 2>/dev/null | grep 'og:image' | sed 's/.*og:image" content="\\([^"]*\\).*/\\1/'`;
echo $url;
Welche dieser
~/Code/stack-overflow $ php hack.php
https://i1.sndcdn.com/artworks-000077991135-u5nvu1-t500x500.jpg
ihre api verwenden ist: https://developers.soundcloud.com/ –
tun Sie einen Grund haben wollen für ihre API benutzen? –