= 2000) $width = 480; if($height <= 0 || $height >= 2000) $height = 360; $query = "select track_id, rcnid from Tracks where track_videocode = '$rb'"; $res2 = mysql_query($query, $connect); $row2 = mysql_fetch_array($res2); if(mysql_num_rows($res2) == 0) { $error = 4007; $response = "TrackCode not found!"; } else if(!$avdeg) { $error = 4099; $resposne = "AV Desg not found"; } else { $trackid = $row2['track_id']; $stream = $row2['rcnid']; $query = "select * from Clients_VideoTracks where track_id = $trackid and client_id = $userid"; $res = mysql_query($query, $connect); if(mysql_num_rows($res) > 0) { $row = mysql_fetch_array($res); $desg = $row['av_designator']; //$key = "xp92mn47dje827c7m2sx08gh3d"; //$ref = "XpressBet"; $key = "xp345gfrh435wtger574ju5"; $ref = "XpressBetGWS"; $time = time()+$ttl; // Timestamp & Private Key & Stream Name $md5 = md5($time.$key.$stream); if($userid == 8000) $url = "https://stream.robertsstream.com/streamflash.php?referer=$ref&stream=$stream&staticspeed=1&speed=high&t=$time&usr=$avdeg&h=$md5&width=$width&height=$height"; else $url = "https://stream.robertsstream.com/streamflash.php?referer=$ref&stream=$stream&t=$time&usr=$avdeg&h=$md5&width=$width&height=$height"; $error = 0; } else { $error = 4005; $response = "Permission for AV service!"; } } } if($error == 0) { header("Location: $url"); } else { echo "ErrorCode: $error - resp: $response"; }