| | |
How to Refresh a PHP page and add a clickable link
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2008
Posts: 1
Reputation:
Solved Threads: 0
php Syntax (Toggle Plain Text)
<?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 Syntax (Toggle Plain Text)
<?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.
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. Last edited by nil_gh_80; Aug 6th, 2008 at 2:51 am.
![]() |
Similar Threads
- Firefox Compatibility help with script (JavaScript / DHTML / AJAX)
Other Threads in the PHP Forum
- Previous Thread: navigation?
- Next Thread: Submit Form To MySQL Table
| Thread Tools | Search this Thread |
ajax apache api archive array autocomplete beginner binary broken cakephp checkbox class cms code cron curl database dataentry date display duplicates dynamic echo email emptydisplayvalue error errors execute explodefunction file files firstoptioninphpdroplist folder form forms function functions google href htaccess html image include insert integration ip java javasciptvalidation javascript joomla keywords limit link login loop mail matching menu mlm multiple mysql oop paypal pdf php phpincludeissue problem query radio random recursion recursive regex remote script search server sessions shot sms soap source space sql subscription syntax system table tutorial tutorials update upload url validator variable vbulletin video web xml youtube





