IanBlackford
New member
- Joined
- May 31, 2013
- Messages
- 2
Hi,
Really sorry if this is in the wrong place, but I think it's something that can be solved with the API. However, if you reply to this please understand that I know nothing about the structure of the DA code, or files or how it all works. I have a reseller account and I can operate DA, but my knowledge does not extend very far after that. Please treat me as a complete novice.
Here is what I want to achieve, I want to be notified every year on the anniversary of setting up an account, so if I set up an account today, I want to have an email sent to me in 12months (then 24months, then 36 months etc) reminding me to invoice the client for their hosting. I was hoping this would be a core feature in DA but it seems that it isn't, so I started looking at the API to see if I could work something out for myself, but I'm not that good I'm afraid which is why I'm turning to the forum for some guidance.
It seems that other people have wanted something similar to this, but they have talked about a billing plugin. I don't want that, I have my accounts package for invoicing, I just need a reminder to generate my invoice.
So I was thinking, is there a way of running a daily cron job to look up the creation date of an account? If so - how do I construct that via the API?
I found this example:
<?php
include 'httpsocket.php';
$sock = new HTTPSocket;
$sock->connect('domain',2222);
$sock->set_login('un','pw');
$sock->query('/CMD_API_SHOW_ALL_USERS');
$result = $sock->fetch_parsed_body();
print_r($result);
?>
Which I thought might start me off, but I don't know how to put it into practice. I understand how to add my domain, UN and PW into the above, but where do I save the file and how do I call it.
Of course that might be not the place to start, so I'd appreciate a little help if possible.
I know what i want but maybe I haven't explained myself very well, if you are confused please reply and I'll try and make it clearer.
Thanks in advance.
Ian
Really sorry if this is in the wrong place, but I think it's something that can be solved with the API. However, if you reply to this please understand that I know nothing about the structure of the DA code, or files or how it all works. I have a reseller account and I can operate DA, but my knowledge does not extend very far after that. Please treat me as a complete novice.
Here is what I want to achieve, I want to be notified every year on the anniversary of setting up an account, so if I set up an account today, I want to have an email sent to me in 12months (then 24months, then 36 months etc) reminding me to invoice the client for their hosting. I was hoping this would be a core feature in DA but it seems that it isn't, so I started looking at the API to see if I could work something out for myself, but I'm not that good I'm afraid which is why I'm turning to the forum for some guidance.
It seems that other people have wanted something similar to this, but they have talked about a billing plugin. I don't want that, I have my accounts package for invoicing, I just need a reminder to generate my invoice.
So I was thinking, is there a way of running a daily cron job to look up the creation date of an account? If so - how do I construct that via the API?
I found this example:
<?php
include 'httpsocket.php';
$sock = new HTTPSocket;
$sock->connect('domain',2222);
$sock->set_login('un','pw');
$sock->query('/CMD_API_SHOW_ALL_USERS');
$result = $sock->fetch_parsed_body();
print_r($result);
?>
Which I thought might start me off, but I don't know how to put it into practice. I understand how to add my domain, UN and PW into the above, but where do I save the file and how do I call it.
Of course that might be not the place to start, so I'd appreciate a little help if possible.
I know what i want but maybe I haven't explained myself very well, if you are confused please reply and I'll try and make it clearer.
Thanks in advance.
Ian