como crear plugin para mi pagina http://carrito.hol.es/
Cita de: freedarwuin en Junio 21, 2013, 10:04:48 PM
como crear plugin para mi pagina http://carrito.hol.es/
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include "../utils.cpp"
using namespace std;
// use this line to compile
// g++ -I. -fPIC -shared -g -o carrito.hol.es.so carrito.hol.es.cpp
// Regex
// http.*\.carrito\.hol\.es.*(\.swf|\.jpg|\.png|\.gif)
string get_filename(string url) {
vector<string> resultado;
string retorna = "";
stringexplode(url, "/", &resultado);
retorna = resultado.at(resultado.size()-2) + "-"+resultado.at(resultado.size()-1);
return retorna;
}
extern "C" resposta getmatch(const string url) {
resposta r;
if ( (url.find("carrito.hol.es/") != string::npos)
) {
r.file = get_filename(url);
if (!r.file.empty()) {
r.match = true;
r.domain = "carrito";
} else {
r.match = false;
}
}
else
{
r.match = false;
}
return r;
}
espero le sriva, Saludos
asi lo hice yo y no me hace cache al igual quye esta mikronetinico.hol.es
Gracias si funciono al igual que mikronetinicio.hol.es
Cita de: freedarwuin en Agosto 18, 2013, 04:42:02 PM
Gracias si funciono al igual que mikronetinicio.hol.es
Me alegra que le halla funcionado, cualquier cosa me avisa, Saludos