Hola joe soy nuevo en raptor cache he stado leyendo y me gustaria que me ayudaran hacer estos plugins
gracias
estos son los dominios
www.saren.gob.ve
www.bancodevenezuela.com
http://actualidadiphone.net/
http://www.taringa.net/
http://www.apple.com/
Nadie help
Buenas amigo anexo 2 plugin que tengo, de los que estas solicitando. saludos.
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// g++ -I. -fPIC -shared -g -o bancodevenezuela.com.so bancodevenezuela.com.cpp
// regex
// http.*\.bancodevenezuela\.com.*(\.png|\.jpg|\.gif|\.swf)
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(".bancodevenezuela.com/") != string::npos) and
( (url.find(".png") != string::npos) or
(url.find(".jpg") == string::npos) or
(url.find(".gif") == string::npos) )
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "bancodevenezuela_imagenes";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o apple.com.so apple.com.cpp
// regex
// http.*\.apple\.com.*(\.swf|\.jpg|\.png|\.gif|\.rar|\.zip|\.mp4|\.mp3|\.exe)
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()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
} else {
stringexplode(url, "/", &resultado);
return resultado.at(resultado.size()-3)+"_"+resultado.at(resultado.size()-2)+"_"+resultado.at(resultado.size()-1);
}
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find(".apple.com/") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "itunes/apple.com";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
Otro Plugin Saren
#include <iostream>
#include <cstring>
#include <vector>
#include "../utils.cpp"
// use this line to compile
// g++ -I. -fPIC -shared -g -o saren.gob.ve.so saren.gob.ve.cpp
// regex
// http.*\.saren\.gob\.ve.*(\.jpg|\.png|\.mp4|\.gif)
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(".saren.gob.ve/") != string::npos) and ((url.find(".jpg") != string::npos) or (url.find(".png")!= string::npos) or (url.find(".mp4") != string::npos) or (url.find(".gif") != string::npos))
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "saren";
} else {
r.match = false;
}
} else {
r.match = false;
}
return r;
}
buen aporte a seguir aportando muchacho
David M..
Saludos
Las gracias mi hermano bueno yo tambien estoy dandole poco a poco para ir aprendiendo y aportar saludos
La de Taringa seria bueno aun no lo entiendo como hacer el plugins