[Tutorial] Write your engines with ease, skip the script-manual, use macros...
andrzejek
Polska
https://github.com/seospace/gsapi (I fixed readme and source code)
I think that i explained everything in the README file, it's a simple server that let's you integrate your script's / template's / macros into GSA SER.
Feel free to ask any questions.
I think that i explained everything in the README file, it's a simple server that let's you integrate your script's / template's / macros into GSA SER.
Feel free to ask any questions.
Comments
But I dont understand: after run in GSA - requests are redirected to ZennoPoster and he do all work and return back some response with data, right?
There are 3 important variables:
- post data in engine.ini
- link_id (used to track linking task, once SER sends post data to gsapi, gsapi sends back link_id)
- engine_name
SER talks only to gsapi server. It will:
1. Send POST request with your link data (post_data) to gsapi server.
2. Receive JSON response with link_id in gsapi database.
3. Keep trying to verify http://gsapi.local/api/link/verify_redirect/link_id
Your script (Zennoposter) talks only to gsapi server. It will:
1. Send GET request to http://gsapi.local/api/link/consume/engine_name
2. If there is a pending linking task, receive JSON response with post_data.
3. Once it creates a link - send GET request to http://gsapi.local/api/link/set_redirect/link_id/url_encoded_location_where_SER_can_verify_your_link
Now when SER goes to http://gsapi.local/api/link/verify_redirect/link_id it will be redirected to url_encoded_location_where_SER_can_verify_your_link
SER -> gsapi server -><- your script
Its a proxy that is able to:
- receive data from SER about what you need to do
- send data to your script (Zennoposter) about what has to be done
- receive data from your script (Zennoposter) about what is done
- redirect SER to what is done
Take a look here this code is really simple to understand.
I have also linked it on the docu page.
1) I create link using ZP
2) Send GET to SER so it can create tiers but :
GET:
http://localhost:9090/api/link/set_redirect/1/http://dupa.com/1.html
http://gsapi.local/api/link/set_redirect/link_id/url_encoded_location_where_SER_can_verify_your_link