New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Trying to get graphs to a file

Votes:

0

Your Vote:

Up

Down

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

api graphs php

Created on May 6, 2014 7:09:05 PM by  bart2puck (0) 1



5 Replies

Accepted Answer

Votes:

0

Your Vote:

Up

Down

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.

Created on May 7, 2014 12:09:33 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

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....

Created on May 7, 2014 2:47:38 PM by  bart2puck (0) 1



Votes:

0

Your Vote:

Up

Down

That would be a problem in your script then. I'm sorry, but we can't assist with that.

Created on May 7, 2014 3:10:45 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

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?

Created on May 7, 2014 3:12:06 PM by  bart2puck (0) 1



Votes:

0

Your Vote:

Up

Down

i did not see your passhash comment. that was the problem. thank you.

Created on May 7, 2014 3:19:20 PM by  bart2puck (0) 1



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.