PDA

View Full Version : Importing an image


Html33
06-07-2009, 08:45 PM
Right, i have a little issue i was using this image to tell me the status of my server;

http://www.runelocus.com/tools/statusimg.php?ip=dhgaming.no-ip.biz&port=43594

http://www.runelocus.com/tools/statusimg.php?ip=dhgaming.no-ip.biz&port=43594

But i have decided that i want my own one so i can customise it for the forum. The URL for mine is

http://dhgaming.com/status/rspserver/index.php?ip=dhgaming.no-ip.biz&port=43594

https://vborg.vbsupport.ru/external/2009/06/128.jpg

Although, with the old one i used to be able to embed it into the page using

<img src="http://dhgaming.com/status/rspserver/index.php?ip=dhgaming.no-ip.biz&port=43594">

But with my one i can't [ just outputs a blank / missing image although when you go to the link it is there]. So i was wondering how would i get the image to display on the page? I was figuring i would need to use plugins

the code in my script is;

<?php error_reporting (E_ALL ^ E_NOTICE); ?>
<?php
$ip = "$_GET[ip]";
$port= "$_GET[port]";
$online = '<img src="online.gif">';
$offline = '<img src="offline.gif">';
if (! $sock = @fsockopen($ip, $port, $num, $error, 5))
{
echo "$offline";
echo "</font>";
}
else
{
echo "$online";
echo " </font>";
}
?>

Dismounted
06-08-2009, 05:04 AM
You must generate an image file using the PHP image functions (or just send file type and data). What you are doing is sending actual HTML there, which cannot be "included" using HTML IMG tags.

Html33
06-08-2009, 07:32 AM
You must generate an image file using the PHP image functions (or just send file type and data). What you are doing is sending actual HTML there, which cannot be "included" using HTML IMG tags.

Would somone mind doing that? It took me long enough to make this! :@ [looks around]

I understand what you mean, but i dont know how on earth i would do it. Would you mind doing it for me?

Dismounted
06-08-2009, 09:54 AM
Have a look in vBulletin's image.php - pick out the bits you need.

No, I am not here to code for you.

Html33
06-08-2009, 06:22 PM
Cheers for the help, although you put that quite harsh.

Any one else willing to help me? :P