Auto login site using fetch

since i change my device from openwrt to mikrotik
in previous router i using bash script for auto login site, I try convert bash script to mikrotik
i wonder is this already correct ? since i only read from Manual:Tools/Fetch#!/bin/bash

Check ip from isp

ipwan=$(ifconfig | grep -A 2 ‘wlan0’ | awk ‘/inet addr/{print substr($2,6)}’)

Test Connection

if ping -q -c 1 -W 1 8.8.8.8 >/dev/null;
then
echo “The network is up”
else
echo “The network is down”

Login

wget --post-data=“username=lordkiehl@freeMS&password=pa$$wrd” “http://welcome2.wifi.id/wms/auth/authnew/autologin/quarantine.php?ipc=“$ipwan”&gw_id=WAG-D4-KBU&client_mac=xx:b4:29:d8:xx:ce&wlan=SLOGLD00371/TLK-WI31477992-0001:UN%20CHECK” -O /dev/null
fi

i try execute this on mikrotik scripting but unable to login
:local ip [/ip address get [/ip address find interface=“wlan1”] address];
:local ip [put [:pick $ip 0 [:find $ip “/”]]]

/tool fetch http-method=post http-data=“username=lordkiehl@freeMS&password=pa$$wd” url=(“http://welcome2.wifi.id/wms/auth/authnew/autologin/quarantine.php\?ipc=$ip&gw_id=WAG-D4-KBU&client_mac=xx:xx:xx:xx:xx:xx&wlan=SLOGLD00371/TLK-WI31477992-0001:UN%20CHECK”) keep-result=noThank you before
sorry for miss spell or wrong grammar

Please help..

I have an ISP internet connection where to get an internet connection I have to connect to a hotspot and when connected, a login page will appear and must enter a username and password and a new login I get an internet connection after logging in. I use RB951Hap to connect to my ISP hotspot using the Wlan interfaces on Rb951.

My problem is to log in with a 1-month voucher. I have to edit the default url where the default url is “https://welcome2.wifi.id/wms/?gw_id=WAG-D4-KBU&client_mac=cc:2d:e0:87:55:47&wlan=SLOKTO00030/TLK-WI32028314-0001:Soto%20Gerabah%20Bu%20Yayun

and I have to change to the url “https://welcome2.wifi.id/login/auth/authnew/autologin/quarantine.php?ipc=$ip&gw_id=WAG-D4-KBU&client_mac=cc:2d:e0:87:55:47&wlan=SLOKTO00030/TLK-WI32028314-0001:Soto%20Gerabah%20Bu%20Yayun

I previously used your auto login script

but this script can only point to the default login page

what script code, which can redirect from the default login page url to the url “https://welcome2.wifi.id/login/auth/authnew/autologin/quarantine.php?ipc=$ip&gw_id=WAG-D4-KBU&client_mac=cc:2d:e0:87:55:47&wlan=SLOKTO00030/TLK-WI32028314-0001:Soto%20Gerabah%20Bu%20Yayun
and mikrotik I can auto login.

thank you