aeriagames : juegos online
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o aeriagames.com.so aeriagames.com.cpp
// regex
// http.*\.aeriagames\.com.*(\.gif|\.jpg|\.png|\.exe|\.swf|\.jpg|\.rar|\.zip)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".aeriagames.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "Aeriagames";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Funciona ok en mi servidor thundercache
( http://www.static.org ) Aeriagames 25 3.74 MiB 5.5 MiB 20 147,30 %
Cita de: david_domh en Agosto 15, 2013, 05:58:56 PM
aeriagames : juegos online
Cita de: david_domh en Agosto 15, 2013, 05:58:56 PM
aeriagames : juegos online
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o aeriagames.com.so aeriagames.com.cpp
// regex
// http.*\.aeriagames\.com.*(\.gif|\.jpg|\.png|\.exe|\.swf|\.jpg|\.rar|\.zip)
string get_filename(string url) {
vector<string> resultado;
if (url.find("?") != string::npos) {
stringexplode(url, "?", &resultado);
stringexplode(resultado.at(resultado.size()-2), "/", &resultado);
return resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".aeriagames.com") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "Aeriagames";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Funciona ok en mi servidor thundercache
( http://www.static.org ) Aeriagames 25 3.74 MiB 5.5 MiB 20 147,30 %
[/code]
gracias hermano exelente aporte
Funciona ok en mi servidor thundercache
( http://www.static.org ) Aeriagames 25 3.74 MiB 5.5 MiB 20 147,30 %