I have a script that will call prtg to get a graph, how can i do this? I do not want to show the graph on a page, rather download it to a folder for further processing.
$url = "https://monitor.newcoit.com/chart.png?type=graph&width=900&height=420&graphid=1&id=2192&username=username&userhash=somehas"; echo "<img src='" . $url . "'>";
i am trying to use php file_get_contents or fopen() and when it try these, i get the login page for my prtg instance
Article Comments
the browser works fine.
i can also do echo "<img src='http......'>";
and that works fine too.
$url = "http://....."; the problem is with file_get_contents($url) or fopen($url). when i do these, it returns the login page....
May, 2014 - Permalink
That would be a problem in your script then. I'm sorry, but we can't assist with that.
May, 2014 - Permalink
so as far as you know, there are no limitations to the types of calls that request the graphs? browser type, curl options or anything?
May, 2014 - Permalink
Hello,
thank you very much for your KB-Post. Can you please try the URL first in a normal browser? Do you then get a graph image shown? Just to check, please use 'passhash' not 'userhash'. The latter does not work.
best regards.
May, 2014 - Permalink