<?php
//URL to file.
$data1 = 'http://66.232.193.178/sampserver/scriptfiles/Onlinetext.txt';
$data2 = file($data1);
foreach($data2 as $key => $value) {
$data2[$key] = substr($data2[$key],stripos($data2[$key],"=")+1);
$data2[$key] = str_replace(array("\r","\n"),"",$data2[$key]);
}

//Your base image.
$gd = imagecreatefromjpeg("online.jpg");

//some colors..
$white = imagecolorallocate($gd, 255, 255, 255); 
$black = imagecolorallocate($gd, 1, 1, 1);
$green = imagecolorallocate($gd, 0, 0, 255);
$red = imagecolorallocate($gd, 255, 0, 0);
//Data to show.
imagestring($gd, 30, 195, 10, "ECLIPSE ROLEPLAY", $black);
imagestring($gd, 30, 195, 30, "www.rmdt-clan.com", $black);
imagestring($gd, 5, 5, 30, 'Players Online:' . $data2[0], $black);
imagestring($gd, 5, 375, 30, 'Most Online:' . $data2[1], $black);
imagestring($gd, 5, 130, 50, 'Total Players Connected:' . $data2[2], $black);
imagestring($gd, 5, 130, 65, 'Server Online Time(Seconds):' . $data2[3], $black);
imagestring($gd, 5, 130, 85, 'Server Online Time(Minutes):' . $data2[4], $black);
imagestring($gd, 5, 130, 105, 'Server Online Time(Hours):' . $data2[5], $black);
imagestring($gd, 5, 130, 125, 'Server Online Time(Days):' . $data2[6], $black);
imagestring($gd, 5, 5, 145, 'Players Kicked:' . $data2[7], $black);
imagestring($gd, 5, 350, 145, 'Players Banned:' . $data2[8], $black);
imagestring($gd, 5, 5, 165, 'Script Version:' . $data2[9], $black);
imagestring($gd, 5, 240, 165, "ServerIP: 66.232.193.178:7779", $black);
header('Content-Type: image/jpeg');
imagejpeg($gd);
?>

How can i make that PHP script Refresh Itself and Also how can i make the www.rmdt-clan.com url clickable

Thanks to all of you web developers for making this happen

<?php
//URL to file.
$data1 = 'http://66.232.193.178/sampserver/scriptfiles/Onlinetext.txt';
$data2 = file($data1);
foreach($data2 as $key => $value) {
$data2[$key] = substr($data2[$key],stripos($data2[$key],"=")+1);
$data2[$key] = str_replace(array("\r","\n"),"",$data2[$key]);
}

//Your base image.
$gd = imagecreatefromjpeg("online.jpg");

//some colors..
$white = imagecolorallocate($gd, 255, 255, 255); 
$black = imagecolorallocate($gd, 1, 1, 1);
$green = imagecolorallocate($gd, 0, 0, 255);
$red = imagecolorallocate($gd, 255, 0, 0);
//Data to show.
imagestring($gd, 30, 195, 10, "ECLIPSE ROLEPLAY", $black);
imagestring($gd, 30, 195, 30, "www.rmdt-clan.com", $black);
imagestring($gd, 5, 5, 30, 'Players Online:' . $data2[0], $black);
imagestring($gd, 5, 375, 30, 'Most Online:' . $data2[1], $black);
imagestring($gd, 5, 130, 50, 'Total Players Connected:' . $data2[2], $black);
imagestring($gd, 5, 130, 65, 'Server Online Time(Seconds):' . $data2[3], $black);
imagestring($gd, 5, 130, 85, 'Server Online Time(Minutes):' . $data2[4], $black);
imagestring($gd, 5, 130, 105, 'Server Online Time(Hours):' . $data2[5], $black);
imagestring($gd, 5, 130, 125, 'Server Online Time(Days):' . $data2[6], $black);
imagestring($gd, 5, 5, 145, 'Players Kicked:' . $data2[7], $black);
imagestring($gd, 5, 350, 145, 'Players Banned:' . $data2[8], $black);
imagestring($gd, 5, 5, 165, 'Script Version:' . $data2[9], $black);
imagestring($gd, 5, 240, 165, "ServerIP: 66.232.193.178:7779", $black);
header('Content-Type: image/jpeg');
imagejpeg($gd);
?>

How can i make that PHP script Refresh Itself and Also how can i make the www.rmdt-clan.com url clickable

Thanks to all of you web developers for making this happen

I think you should use meta tag for refreshing,,,,,which is the simplest way.....

Redirecting to a New Page
While the reload option is useful, it is usually not what people want from the meta refresh tag. To redirect to a new page, the syntax is nearly the same:
<meta http-equiv=”refresh” content=”2;url=http://webdesign.about.com”>
The only difference is in the content attribute.
content=”2;url=http://webdesign.about.com
The number is the time, in seconds, until the page should be redirected. Then, separated by a semi-colon (;) is the URL that should be loaded.

How can we refresh a page every 20 seconds wothout using javascript?

We can refresh the page with the help of meta refresh tag.
The meta tag belongs within the <head> of your HTML document. When used to refresh the current page, the syntax looks like this:
<meta http-equiv=”refresh” content=”20″>
This is the amount of time, in seconds, until the browser should reload the current page.
Redirecting to a New Page
While the reload option is useful, it is usually not what people want from the meta refresh tag. To redirect to a new page, the syntax is nearly the same:
<meta http-equiv=”refresh” content=”2;url=http://webdesign.about.com”>
The only difference is in the content attribute.
content=”2;url=http://webdesign.about.com
The number is the time, in seconds, until the page should be redirected. Then, separated by a semi-colon (;) is the URL that should be loaded.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.