Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


dazz1

97 posts

Master Geek
+1 received by user: 3


#214229 2-May-2017 20:58
Send private message

Hello

 

When Spark was Telecom, I used to use the following command in a perl script to get the data usage.

 

I have a USB mobile modem running on a remote headless server.
I want to be able to know how much data is left on my plan so I can throttle the data flow if needed.

 

 

my $url = "http://m.telecom.co.nz/yt";

 

 

my $line = `wget $url -q --delete-after -nd -O - | grep " remaining MB"`;

 

 

What url and command would I now use????

 

 

 

Dazz





 

Regards

 

 

Dazz

Create new topic
firefuze
510 posts

Ultimate Geek
+1 received by user: 85


  #1774624 2-May-2017 21:23
Send private message

http://www.spark.co.nz/onliness/my-usage.html

 

or

 

http://spark.co.nz/yt

 

 

 

Cant help with the command sorry




dazz1

97 posts

Master Geek
+1 received by user: 3


  #1774653 2-May-2017 21:44
Send private message

 Hi

 

I found that the address:  http://m.spark.co.nz/yt  works.

 

It looks like Spark has changed the text around data usage.  I used that text to find it.  I need to change my search.

 

 

 

dazz





 

Regards

 

 

Dazz

dazz1

97 posts

Master Geek
+1 received by user: 3


  #1774809 3-May-2017 10:34
Send private message

 Hi

 

The text  (2 consecutive lines) with data used and data remaining is:

 

<span class="remaining-data">54MB used</span>
<span class="expires-data-right-align">1.44GB remaining</span>

 

This is true May 2017.





 

Regards

 

 

Dazz

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.