Hello,
I have a attached a php script which when run will connect to a ntop running on
127.0.0.1:3000, do a data dump and save the file using libcurl. The file will
tried to be saved ./month-day-year-timestamp (02:24:04-1077635664).This is done for logging, then the file is "include"d in the php script so the php variables are accessible. It will then parse the data and try to insert it into a mysql db called ntop. The table name is ntop_daily with a user name and password of ntop. >From the file you can see all the fields that I save data on. This was my first real php script so you most likely could improve it. I called the script by using curl: cronjob: /usr/bin/curl -k -s -s --digest -u username:password https://mis.domain.com/uploads/ntopget.php This way if you had multiple ntop servers you could pass it a IP as a variable. Also a up now button would be possible. Anyways I hope someone could use this, I find it handy to save stats based a day bases. -- Michael Gale Network Administrator Utilitran Corporation
ntopget.php
Description: Binary data
