Jump to content

[Solved] Problems File_Get_Contents And Curl To Link Soundcloud


Recommended Posts

Posted

Stevie is blocked by Soundcloud:

rax@rax.heliohost.org [~]# wget -O=sc.tmp "http://api.soundcloud.com/tracks?q=Adventure\&limit=5\&client_id=7fda73e4303db4146b1b2145944d3e1c"
--2016-08-09 09:16:29--  http://api.soundcloud.com/tracks?q=Adventure&limit=5&client_id=7fda73e4303db4146b1b2145944d3e1c
Resolving api.soundcloud.com... 72.21.91.127
Connecting to api.soundcloud.com|72.21.91.127|:80...

 

It never connects, sits for several minutes then times out.

 

On a local server of mine:

root@acmine:~# wget -O=sc.tmp http://api.soundcloud.com/tracks?q=Adventure\&limit=5\&client_id=7fda73e4303db4146b1b2145944d3e1c
--2016-08-09 12:21:01--  http://api.soundcloud.com/tracks?q=Adventure&limit=5&client_id=7fda73e4303db4146b1b2145944d3e1c
Resolving api.soundcloud.com (api.soundcloud.com)... 72.21.91.127
Connecting to api.soundcloud.com (api.soundcloud.com)|72.21.91.127|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9383 (9.2K) [application/json]
Saving to: `=sc.tmp'

100%[===================================================================================================================>] 9,383       --.-K/s   in 0.001s

2016-08-09 12:21:02 (7.76 MB/s) - `=sc.tmp' saved [9383/9383]

root@acmine:~#

Looks good. That sc.tmp contains a JSON result.

Posted

On the command line you need to escape your ampersands like this

http://api.soundcloud.com/tracks?q=Adventure\&limit=5\&client_id=7fda73e4303db4146b1b2145944d3e1c
Otherwise it breaks the command up and tries to run it in the background etc.

 

Resolving api.soundcloud.com... 72.21.91.127

Connecting to api.soundcloud.com|72.21.91.127|:80...

So, here's the problem:

72.21.91.127 # DOS 42 connections - Thu Jul 28 13:17:47 2016
Soundcloud doesn't have us blocked. We have them blocked...
Posted

Yeah, I realized that after I posted it when I looked closer and realized it chopped most of the arguments off.

 

Re-ran and post edited.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...