Checking TelkomSpeedy Usage Using XMLHTTPRequest
If you have a TelkomSpeedy ADSL connection, oftenlly you’ll check your internet account usage. The bad thing is, you need to access telkom’s website download their huge flash just for view a couple lines of information about bandwith limit and usage. So, I’ve create a little javascript application for viewing current TelkomSpeedy usage. I mean, just the usage
This little script is utilizing the useful XMLHttpRequest and Javascript capabilities. The XMLHTTP object will do all the HTTP communication. This javascript can be run in your Windows Box using WScript.exe or CScript.exe, this two apps is shipped with your Windows instalation.
Usage
You can directly download the scripts here. Just edit the files with notepad to change the username and password with your speedy account username and password. And then, connect to internet with your speedy account, run the file by double-click it.
Here’s the screenshot:

For developers, here a little bit explanation about the script. First we create the xmlhttp object
var xmlhttp = false;
// create xmlhttp object
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
// no xml http, bail
WScript.Echo("Error, cannot create XMLHTTP object");
WScript.Quit();
}
}
And then, we need to send the login information, and retrieve the session cookie
var cookie = '';
var logged_in = false;
xmlhttp.open("POST", "http://divre5.telkomspeedy.com/session.php", false);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4) {
// retrieve session cookie
cookie = xmlhttp.getResponseHeader('set-cookie');
//check for login status
body = xmlhttp.responseText;
if (body.match(/location.href='\/\?'/)) {
logged_in = true;
} else {
WScript.Echo("Error, login failed!");
WScript.Quit();
}
}
}
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.send('username='+username+'&password='+password);
When our loggin success, their website gives a JS redirection code:
location.href='/?';
So we just need to follow their redirection and parse the speedy bandwith info.
xmlhttp.open("POST", "http://divre5.telkomspeedy.com/?", false);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4) {
cookie = xmlhttp.getResponseHeader('set-cookie');
body = xmlhttp.responseText;
// retrieve speedy usage
pos = body.indexOf('Sisa Limit');
limit = body.substring(pos + 33, pos + 38);
pos = body.indexOf('Pemakaian
');
used = body.substring(pos + 32, pos + 37);
WScript.Echo("Speedy Usage For: " + username + "\nSisa Limit: " + limit + "%\nTerpakai : " + used + "%" );
}
}
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Cookie", cookie);
xmlhttp.send('');
And there’s we grep the useful information of speedy usage, minus downloading the image
and javascript.
Great script!
Unfortunally, I have no Speedy connection :(
Finnaly, this trick is very usefull
btw how about application for check speedy billing that is downloaded from telkomspeedy web?
but i think this is better, small and useful
mas aryo, biasane pake opo :p
Cool!!
But speedy already had tool for that. http://www.telkomspeedy.com/new/download/InstallerSpeedyAlertNasional.zip
why download and use 2 megs application if all you need is only the percentage use info?
“Don’t use a cannon to kill a mosquito”
hehehe
Size does matter Right?!?!?!
Btw, can you add more detail about how much the bandwidth has been used. Not just the percentage.
# Btw, can you add more…
I’ll work on that, thanks for the input
kok gua coba masih error ya? syntak username & passwordnya yg bener gimana? bisa kasih contoh?
Biasa kok mas,
username: #####@telkom.net
dan password: bla2
btw, klo boleh tau, pesan errornya apa yak?
buat mas ndra:
u/ linux ada toolnya mas:
http://ferdianto.com/2007/03/10/checking-speedy-usage-in-python/
saya di daerah sini mas:
https://divre1plg.telkomspeedy.com/
url yang perli saya ganti dah di ganti..
user:pass dah di masukin
katanya error ngga bisa loggin…
koq ngga bisa yah..
apa mang dah berubah lagi…
tegkyu mas ferdhie
Lol, kewl script.. haha
lu lagi bikin apa sih? ribet amat?
bikinan gue ga pake password nih hahaha, jalan di semua sistem operasi!
http://www.joandilee.com/2008/05/31/telkom-speedy-alert-community-edition/
just type and click…
lagian kenapa kalo ga pake password? emangnya lu tau no speedy tetangga lu? haha…