I'd like to get the song or program name details from a particular online radio/tv broadcast url. This url could be a file with *.pls extension or in form of mms protocol.
Is there any web request technic, library for php or any popular language?
i am not so sure that this answer will help you, but it can lead you to solution
$url = parse_url(URL);
abouve url will give you an array of the following format
Array
(
[scheme] => http
[host] => eksensc.radyotvonline.com
[path] => /listen.pls
)
you can get $url['path'] from that array,
Hope it hepls ! Thanks
Related
I was developing a Shopify App. It was working fine till yesterday evening, but then I started getting the Bad Request [400] error, after the user allow access to the app for his shop.
Error is below
(https://SHOP-NAME.myshopify.com/admin/oauth/access_token) in /path/to/shopify/authentication/oauth.php on line 28
Array (
[method] => POST
[uri] => https://SHOP-NAME.myshopify.com/admin/oauth/access_token
[query] => Array ( )
[headers] => Array ( )
[payload] => Array (
[client_id] => {CLIENTID}
[client_secret] => {CLIENT_SECRET}
[code] => {CODE}
)
)
I'm doing a POST cURL Request with Content-Type:application/x-www-form-urlencode and all the request are validated to be coming from shopify.
If anyone want more information I can provide.
Thanks.
If this happening after the user authorizes the app, it could be an issue with the permanent token they have received. You could try grabbing the token that is generated and doing a POSTMAN request manually to query the API to verify the token works.
If it worked before and you didn't make any changes to the app, it could be a temporary API issue, even though I found that to be rare with my app.
The code parameter that is sent from Shopify can only be used a single time.
If you re-make the original request that sends the code parameter to your server, you should be able to make the call successfully.
I have the Restful settings enabled on the settings page and I have create a user with access keys.
I am using the PHP library and im getting this reponse.
stdClass Object
(
[errors] => Array
(
[0] => stdClass Object
(
[code] => 404
[message] => cURL HTTP error 404
)
)
)
If i visit the url in the browser /wc-api/v1 I also get a 404 response. I have seen some mentions of changing Permalink structure but it doesn't say what too anywhere?
Any pointers? Greatly received :)
Ok so they settings I need were...
Post name http://www.dipdye.co.uk/sample-post/
and
Shop base with category http://www.dipdye.co.uk/shop/product-category/sample-product/
After further reading it seems any 'pretty' url will work, my main issue was it not updating my Web.config file (as Im on IIS) on Apache this would be the .htaccess file.
I can now see something when i visit the page in web browser.
Hope this help someone else too.
How can I retrieve a specific post/discussion from a open group through LinkedIn API using PHP.
I was trying with the following API request as shown in here http://developer.linkedin.com/documents/groups-api#post :
https://api.linkedin.com/v1/posts/5835685921059532803:(id,type,category,creator,title,summary,creation-timestamp,relation-to-viewer:(is-following,is-liked,available-actions),likes,comments,attachment,site-group-post-url)
But this returns the following error:
Array
(
[status_code] => 400
[data] => stdClass Object
(
[errorCode] => 0
[message] => Invalid Post.id String {5835685921059532803}
[requestId] => XW2XMPBNKY
[status] => 400
[timestamp] => 1391441328953
)
)
Now, what's the error I have made with this request? What should I do to get a specific discussion?
Thanks.
I just solved the problem. The problem was while making the request. The discussion id (5835685921059532803) I was sending with URL was in wrong format. It should be like: g-GROUP_ID-S-DISCUSSION/POST_ID, for example: g-24405-S-5835685921059532803.
So the URL should be:
https://api.linkedin.com/v1/posts/g-24405-S-5835685921059532803:(id,type,category,creator,title,summary,creation-timestamp,relation-to-viewer:(is-following,is-liked,available-actions),likes,comments,attachment,site-group-post-url)
Hope this would save someone's valuable time.
You need An Api key and Secret key,to get an AUTHORIZATION_CODE,using that AUTHORIZATION_CODE,you will get an Access Token,and with that Access Token if you hit the url,then you will get the proper data,
details http://developer.linkedin.com/documents/authentication
I have a PHP script that returns the youtube's url_encoded_fmt_stream_map into arrays
this is an example of one of those arrays
Array
(
[quality] => hd720
[itag] => 45
[url] => http://r7---sn-25ge7n7l.c.youtube.com/videoplayback?source=youtube&expire=1377205488&cp=U0hWTFJLU19NUkNONl9KRVdFOlFROHcyQXZRVzMw&sver=3&mt=1377182899&itag=45&id=f3a24c732e4ea990&upn=aBSr1FoD9WM&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=919112%2C919363%2C914074%2C916624%2C909546%2C906397%2C929117%2C929121%2C929906%2C929907%2C929922%2C929127%2C929129%2C929131%2C929930%2C925720%2C925722%2C925718%2C929917%2C929919%2C929933%2C912521%2C919206%2C932306%2C913428%2C920605%2C904830%2C919373%2C930803%2C908536%2C904122%2C938701%2C911423%2C936308%2C909549%2C900816%2C912711%2C904494%2C904497%2C900375%2C906001&ipbits=8&ratebypass=yes&ip=31.170.160.74&key=yt1&ms=au&mv=u
[fallback_host] => tc.v23.cache8.c.youtube.com
[type] => video/webm; codecs=\"vp8.0, vorbis\"
[sig] => 1A6118D09B20DCD2CD068CAD2415C6BFF80FF5F0.5FB3424173B8FABE7379689138DFA7038B5F11B4
)
how can i put these informations together to make a valid download link ?
any help will be much appreciated and thanks in advance
The download url is already there in the result, for example :
http://r7---sn-25ge7n7l.c.youtube.com/videoplayback?source=youtube&expire=1377205488&cp=U0hWTFJLU19NUkNONl9KRVdFOlFROHcyQXZRVzMw&sver=3&mt=1377182899&itag=45&id=f3a24c732e4ea990&upn=aBSr1FoD9WM&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=919112%2C919363%2C914074%2C916624%2C909546%2C906397%2C929117%2C929121%2C929906%2C929907%2C929922%2C929127%2C929129%2C929131%2C929930%2C925720%2C925722%2C925718%2C929917%2C929919%2C929933%2C912521%2C919206%2C932306%2C913428%2C920605%2C904830%2C919373%2C930803%2C908536%2C904122%2C938701%2C911423%2C936308%2C909549%2C900816%2C912711%2C904494%2C904497%2C900375%2C906001&ipbits=8&ratebypass=yes&ip=31.170.160.74&key=yt1&ms=au&mv=u
will be the url you are looking for in above. This url will change with every request and also only available from the IP which requested it.
I have successfully done with the authentication of Evernote with PHP.
And I have got this response.
Array ( [oauth_token] => S=s1:U=6316e:E=144fcfdfdb9:C=13da54cd1ba:P=185:A=maheshchari-2599:V=2:H=6da806fe92b9289cf0334f04e2afdc55 [oauth_token_secret] => [edam_shard] => s1 [edam_userId] => 405870 [edam_expires] => 1395813907897 [edam_noteStoreUrl] => https://sandbox.evernote.com/shard/s1/notestore [edam_webApiUrlPrefix] => https://sandbox.evernote.com/shard/s1/ )
Now, I want the list of notebooks of the user which has been authenticated with evernote.
I have done a lot of research online but I couldnt find any thing which helps, I have came to know that guid is necessary to get the list of notebooks.
From where I can find that? And how can i access the notestore and userstore?
How can i call the functions of notestore and userstore to fetch the data of user's account and user's notes in php?
Thanks in Advance.
Using the Evernote SDK for PHP, you can list notebooks like the way below:
$client = new Client(array('token' => $authToken));
$noteStore = $client->getNoteStore();
$notebooks = $noteStore->listNotebooks();
All the API references can be found here.
Also, you shouldn't make your token public. Please make sure your token string you put can't be used any more. If you need more help on this, you can get supports from Evernote developer support.
https://github.com/evernote/evernote-sdk-php
go to this link and download this zip then go to sample folder then go to client folder and run EDAMTest.php page.
and add authtoken.