Jump to content
Sign in to follow this  
Tankbuster

"server is up" notification on my webpage?

Recommended Posts

if you see an error, post it here smile_o.gif

- Ben

Note that this is on a host that DOES support freetype.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><br />

<b>Warning</b>:  opendir(vbs250x100): failed to open dir: No such file or directory in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>145</b><br />

<br />

<b>Warning</b>:  readdir(): supplied argument is not a valid Directory resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>147</b><br />

<br />

<b>Warning</b>:  closedir(): supplied argument is not a valid Directory resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>154</b><br />

<br />

<b>Warning</b>:  array_rand(): First argument has to be an array in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>155</b><br />

<br />

<b>Warning</b>:  imagecreatefrompng(vbs250x100/): failed to open stream: No such file or directory in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>161</b><br />

<br />

<b>Warning</b>:  imagecolorallocate(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>168</b><br />

<br />

<b>Warning</b>:  imagecolorallocatealpha(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>169</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>175</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>176</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>177</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>178</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>179</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>175</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>176</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>177</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>178</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>179</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>175</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>176</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>177</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>178</b><br />

<br />

<b>Warning</b>:  imagettftext(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>179</b><br />

<br />

<b>Warning</b>:  imagepng(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>211</b><br />

<br />

<b>Warning</b>:  imagedestroy(): supplied argument is not a valid Image resource in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>212</b><br />

Share this post


Link to post
Share on other sites

And on the host that doesnt;

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><br />

<b>Warning</b>: opendir(vbs250x100): failed to open dir: No such file or directory in <b>/home/teamsp1/public_html/pDSSQ.php</b> on line <b>145</b><br />

<br />

<b>Warning</b>: readdir(): supplied argument is not a valid Directory resource in <b>/home/teamsp1/public_html/pDSSQ.php</b> on line <b>147</b><br />

<br />

<b>Warning</b>: closedir(): supplied argument is not a valid Directory resource in <b>/home/teamsp1/public_html/pDSSQ.php</b> on line <b>154</b><br />

<br />

<b>Warning</b>: array_rand(): First argument has to be an array in <b>/home/teamsp1/public_html/pDSSQ.php</b> on line <b>155</b><br />

<br />

<b>Warning</b>: imagecreatefrompng(vbs250x100/): failed to open stream: No such file or directory in <b>/home/teamsp1/public_html/pDSSQ.php</b> on line <b>161</b><br />

<br />

<b>Warning</b>: imagecolorallocate(): supplied argument is not a valid Image resource in <b>/home/teamsp1/public_html/pDSSQ.php</b> on line <b>168</b><br />

<br />

<b>Warning</b>: imagecolorallocatealpha(): supplied argument is not a valid Image resource in <b>/home/teamsp1/public_html/pDSSQ.php</b> on line <b>169</b><br />

<br />

<b>Fatal error</b>: Call to undefined function: imagettftext() in <b>/home/teamsp1/public_html/pDSSQ.php</b> on line <b>175</b><br />

Share this post


Link to post
Share on other sites

Ah..That could be why tounge2.gif

The problem lies with these line I'm sure

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> // source image:

//$img = imagecreatefrompng("bg_01.png");

$img = imagecreatefrompng(getpngname("vbs250x100"));

Delete the last line, and remove the // from the second one, and that should sort it I think

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> // source image:

$img = imagecreatefrompng("bg_01.png");

- Ben

Share this post


Link to post
Share on other sites

Done that. Was still getting broken image cross.

If i ran it in a browser, it gave thiese errors.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>175</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>176</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>177</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>178</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>179</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>175</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>176</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>177</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>178</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>179</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>175</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>176</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>177</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>178</b><br />

<br />

<b>Warning</b>:  imagettftext(): Could not find/open font in <b>/home/www/edenfami/ofp/pDSSQ.php</b> on line <b>179</b><br />

‰PNG

IHDRúd

âşY IDATxśíËIÅ‚%Éu&öťăwzó

Share this post


Link to post
Share on other sites

You have to have a valid Truetype font and place it somewhere on your server where the script can find it. The font & path are defined in the following line of the script:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> // Set the font you want to use. Include path if the ttf file isn't in the same folder as the script!

$font = "fonts/BADABB__.TTF";

In my case I have all fonts in a seperate subfolder called 'fonts', but you can also just drop it into the same folder as the php script. Just make sure you put the correct relative path in the string.

Share this post


Link to post
Share on other sites

..oh, couldn't one of these been included with the script?

- Ben

Share this post


Link to post
Share on other sites

Right, we have progress.

It works, it displays the graphic, but it never finds the server.

query to server failed!

Status: no answer.

Yet it is there. I've got two people playing on it right now. IP and port are correct!

In the server config, the reportingIP is not specified. Is this relevant?

Also, which calltype should I be using? I don't understand this parameter as it's not mentioned in the standalone server or it's config?

Share this post


Link to post
Share on other sites

The server is behind a router, but is in the DMZ. If clients can find the game, I'm wondering why both Daddl's and the WKK one both cannot see the server?

Share this post


Link to post
Share on other sites
if i use the following transparent picture, the script makes it white.

how can i change this?

http://c930.de/back.png

help.gif

I think you'd have to adapt the settings for the transparent color. Haven't used transparent pngs as of now.

Share this post


Link to post
Share on other sites

we have other problem help.gif

on our server run 2 dedicated servers 1.96c but pDSSQ working only on first started server

how i can fix it ?

sorry for my english banghead.gif

Share this post


Link to post
Share on other sites

Uhm, you can only monitor 1 server at a time with pDSSQ - you'll need a copy with the correct port settings for the second server. Or you could rewrite the script so it accepts parameters for the address and port.

Share this post


Link to post
Share on other sites

perhaps you not understand me icon_rolleyes.gif

we have 2 servers (on one machine)

IP: ofp.etcsquad.com

server #1 port: 2302 ETC1 (small translate smile_o.gif )

server #2 port: 2303 ETC2

i want monitor both servers but responding only first started server

its possible ? confused_o.gif

Share this post


Link to post
Share on other sites

well, you should seperate their ports more. If the server IP is 2302 then the first server is listening for GameSpy queries on 2303, too... I'd recommend seperating the server ports by either 10, 50 or 100 (makes it easier to remember and prevents the ports from overlapping), although setting the second server to port 2304 should probably do the trick.

Share this post


Link to post
Share on other sites
The server is behind a router, but is in the DMZ. If clients can find the game, I'm wondering why both Daddl's and the WKK one both cannot see the server?

I tried the IP you sent me: pDSSQ shows your server prefectly - I used the IP (not the homeip address) and the binary sockets query (mode 5). Maybe it's just a problem with the homeip domain service?

Share this post


Link to post
Share on other sites
well, you should seperate their ports more. If the server IP is 2302 then the first server is listening for GameSpy queries on 2303, too... I'd recommend seperating the server ports by either 10, 50 or 100 (makes it easier to remember and prevents the ports from overlapping), although setting the second server to port 2304 should probably do the trick.

it works yay.gif thank you

Share this post


Link to post
Share on other sites
The server is behind a router, but is in the DMZ. If clients can find the game, I'm wondering why both Daddl's and the WKK one both cannot see the server?

I tried the IP you sent me: pDSSQ shows your server prefectly - I used the IP (not the homeip address) and the binary sockets query (mode 5). Maybe it's just a problem with the homeip domain service?

Well that's the wierdest thing isn't it? Can you PM me the code you used when you had it working, please?

(I've not been using the homeip address with pDSSQ. I've been specifying the IP)

Share this post


Link to post
Share on other sites

Well I just copied one of the scripts I use in my sig for the test. But the version on the website should have worked the same. Anyways, I updated the script to V1.1 - it includes now the query strings for binary DPlay queries of OFP & VBS1 servers, too. The latter hasn't been tested, tho, due to the lack of DPlay servers... Not sure if the binary replies are the same as for Sockets servers.

Edit: seems the binary formats are different. I'll work on that. For OFP DPlay servers querymode 1 should work fine anyways.

Here's the link (same as on the first page).

Share this post


Link to post
Share on other sites

Bah. This still doesn't work.

Can someone give me the IP and port of an existing server that is up 24/7 so that I can rule out any possible problems with my hosting please?

Share this post


Link to post
Share on other sites

1) I tried the first 5 of those servers listed and my install of pDSSQ failed to find any of them.

2) Daddl says he has queried my server successfully. I've seen a screenprint of the result.

3) When I point pDSSQ at my own server, I can see data flowing to and from it so I KNOW it's being queried.

This leads me to think it's either my hosting that is missing a trick or a bug in the script.

So, Daddl would you be good enough to PM me the code that you used to query my gameserver, so that I can try it on my hosting and try to narrow this problem down a little more. Pretty please?

Share this post


Link to post
Share on other sites
So, Daddl would you be good enough to PM me the code that you used to query my gameserver, so that I can try it on my hosting and try to narrow this problem down a little more. Pretty please?

You didn't see a screenshot but a live query - the link doesn't point to a static image but to a script that actually queries your server...

As I told you in the pm the very code that's available for download works perfectly fine for me. The script works fine, but maybe the php installation on your webserver isn't working correctly?

pDSSQ_Teamspaff.php

This is the original script from the archive on my website. Just with the query mode set to 5 and your server IP added.

Of course you DID adjust the paths for font and background images, didn't you?

Share this post


Link to post
Share on other sites

If the code is unchanged, then it must be my hosting. It can be nothing else.

I did change the paths for fonts and background images, the script will fail otherwise.

My install of the script works in every respect, except that it claims there is no server at the given IP, in fact, it fails to find any servers.

You can see how I get frustrated, pDSSQ does EXACTLY what I want, and should work perfectly, except that it doesn't smile_o.gif

I too am beginning to suspect an anomaly in the php install. Unfortunately, I don't have another php enabled host available. I've tried the two at my disposal.

Share this post


Link to post
Share on other sites

Actually even with the path set wrong the script would execute and query the server - you just wouldn't see a thing. wink_o.gif

Anyways, good luck with getting your server to run the script: for me it works fine on PHP4 and on PHP5 (Edit: my website has both installed, so I just tested PHP5, too). Maybe your web host blocks all queries (or incoming replies) except for http?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×