Jump to content

fetchremote


Derpy

Recommended Posts

Hi Guys

would it be somehow possible to fetchRemote or something similiar and make connection with some music site e.g soundcloud and then from that fetchRemote be able to browse through songs like u can play them from ingame

which functions would i need? and which kind of link would that be?

Link to comment

um this?

  
  
<?php 
require_once 'Services/Soundcloud.php'; 
  
// create a client object with your app credentials 
$client = new Services_Soundcloud('YOUR_CLIENT_ID'); 
  
// find all sounds of buskers licensed under 'creative commons share alike' 
$tracks = $client->get('tracks', array('q' => 'buskers', 'license' => 'cc-by-sa')); 

how do i even load php files in mta?would this thing even do anything?

Link to comment

Short answer; yes, you can.

Long answer; Yes, you can but it will take some effort to find a website that works with what you're trying to achieve. A great friend of mine has written an utterly amazing sound streaming resource which uses a Russian website as far as I know - to search for songs by artist and/or album.

Once you've found such a website, you'll need to read up on some PHP scripting - but it ain't too hard. Some websites that I can think of right now are MP3Skull and MP3Chief. However, my friend's also aware of those so I assume there's a reason why he didn't pick one of them.

I won't mention any names, since I don't want him to get bombed with messages about it - but he knows who he is in case he wants to help further. :lol:

Link to comment

It's perfectly possible yes. Dealman's referring to a resource I made for my team's servers with the help of another guy. Truth be told it was the other guy who handled all the HTML code, I just built the resource around it.

What you need is to find a site that stores the song links in the HTML data, so that when you you get the callback from fetchRemote you can go through and find that link and play it on the client. It's a lot of work and there aren't many sites that store the song links that way either. But it's certainly doable (just like Dealman).

You're welcome to PM me if you want any more info. I also may end up releasing the resource we made at some point in the future too :D

Link to comment

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...