直播源批量生成小工具.c

#include 
#include
#include
#define FRONT "http://1.2.3.4:7777/000000"  //源前缀
#define MID 123465 //源序数
#define BACK "/index.m3u8?" //源结尾
#define N 100 //生成源个数
 
int main()
{
	
	char a[100],b[30];
	int i,x=MID;
	FILE *fpWrite=fopen("iptv.txt","w");
	strcpy(a,FRONT);
	strcpy(b,BACK);
	for(i=0;i<N;i++)
	{
		fprintf(fpWrite,"#EXTINF:-1 ,%d\n%s%d%s\n",i,a,x,b);
		x++;
	}
	fclose(fpWrite);
 
}

你可能感兴趣的:(c语言)