#ifndef NBASTREAM_H
#define NBASTREAM_H
char* nbastream(char* link)
{
debug(99, "link %s", link);
int debuglevel = getconfigint("debuglevel", NULL);
char* streamurl = NULL, *tmpstr = NULL, *tmpstr1 = NULL;
char* host = NULL;
char* path = NULL;
char* url1 = NULL;
char* url2 = NULL;
char* url3 = NULL;
char* url4 = NULL;
char* url5 = NULL;
char* id = NULL;
char* width = NULL;
char* height = NULL;
char* curlstring = NULL;
char* token = NULL;
system("rm -rf /var/usr/local/share/titan/plugins/tithek/nbastream*");
/*
http://nbastream.net/philadelphia-76ers-at-oklahoma-city-thunder-live-stream.html
*/
host = string_resub("http://", "/", link, 0);
path = string_replace_all(host, "", link, 0);
path = string_replace_all("http://", "", path, 1);
path = string_replace_all(" ", "%20", path, 1);
tmpstr = gethttps(link, NULL, NULL, NULL, NULL, NULL, 1);
titheklog(debuglevel, "/var/usr/local/share/titan/plugins/tithek/nbastream1_tmpstr", NULL, host, path, tmpstr);
url1 = string_resub("