@古墓之神:呵呵,没有什么不愧的,只是偶尔在TRLE的论坛上看到而已,
@ilovelctr:好像还没有消息说会出个TRL的编辑器吧
@ilovelctr:好像还没有消息说会出个TRL的编辑器吧
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts 菜单引用哈哈,有空我再给改成C#或者是VB.NET的。
#include <stdio.h>
#include <urlmon.h>
#include <direct.h>
#pragma comment(lib,"urlmon.lib")
//using namespace std;
const char URL[]= "http://www.sergeaura.net/TGP/";
char LOCALPATH[] = "c:\\";
const int OFFI = 1000;
const int OFFJ = 17;
int main(int argc, char *argv[])
{
int i = 1 ,j;
char strurl[100];
char SUBI[10],SUBJ[10],SUBH[10];
char localurl[100];
puts("set the location below:");
scanf("%s",&LOCALPATH);
mkdir(LOCALPATH);
puts("which folder would you like to start :");
scanf("%d",&i);
for(;i<OFFI;i++)
{
for(j=1;j<OFFJ;j++)
{
strcpy(strurl,URL);
if(i<10) strcat(strurl,"00");
if((i<100)&&(i>9)) strcat(strurl,"0");
strcat(strurl,itoa(i,SUBI,10));
strcat(strurl,"/images/");
if(j<10) strcat(strurl,"0");
strcat(strurl,itoa(j,SUBJ,10));
strcat(strurl,".jpg");
strcpy(localurl,LOCALPATH);
strcat(localurl,itoa(i,SUBH,10));
strcat(localurl,"_");
strcat(localurl,itoa(j,SUBH,10));
strcat(localurl,".jpg");
printf("Donwloading %s",strurl);
if (!URLDownloadToFile(NULL,strurl,localurl,0,NULL))
{
puts("....Done");
}
else
{
puts("...Failed");
}
}
}
return 0;
}