#ifndef VIDSTREAM_H #define VIDSTREAM_H char* vidstream(char* host, char* file, char* hosterurl) { debug(99, "in host: %s file: %s", host, file); int debuglevel = getconfigint("debuglevel", NULL); char* tmphost = NULL; char* tmpfile = NULL; char* tmpstr = NULL; char* send = NULL; char* ip = NULL; char* streamlink = NULL; char* id = NULL; char* fname = NULL; char* op = NULL; char* hash = NULL; char* hashline = NULL; char* hashlen = NULL; char* referer = NULL; char* usr_login = NULL; char* imhuman = NULL; if(host == NULL || file == NULL) return NULL; tmphost = ostrcat("www.", host, 0, 0); tmpfile = ostrcat("/file/", file, 0, 0); debug(99, "tmphost: %s", tmphost); ip = get_ip(tmphost); debug(99, "ip: %s", ip); debug(99, "tmpfile: %s", tmpfile); debug(99, "file: %s", file); send = ostrcat(send, "GET /", 1, 0); send = ostrcat(send, file, 1, 0); send = ostrcat(send, " HTTP/1.1\r\nHost: ", 1, 0); send = ostrcat(send, host, 1, 0); send = ostrcat(send, "\r\nUser-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.99 Safari/535.1\r\nConnection: close\r\nAccept-Encoding: gzip\r\n\r\n", 1, 0); debug(99, "tmphost: %s", tmphost); debug(99, "tmpfile: %s", tmpfile); debug(99, "send: %s", send); tmpstr = gethttpreal(tmphost, tmpfile, 80, NULL, NULL, NULL, 0, send, NULL, 5000, 1); titheklog(debuglevel, "/tmp/vidstream1_tmpstr", NULL, tmpstr); sleep(1); if(ostrstr(tmpstr, "File Not Found") != NULL) { tmpstr = string_resub("