Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Web Coding

Reply
 
LinkBack Thread Tools
Old 10-03-09   #1 (permalink)
Programmer
 
†Blade†'s Avatar
 
intel ati

Join Date: Oct 2007
Location: Wellington, Ohio
Posts: 373

Rep: 67 †Blade† is acknowledged by some
Unique Rep: 54
Trader Rating: 0
Default Making a PHP Block

Hello, I was looking to get some well needed help from you guys as I am new to PHP and can't find anything on the internet about this. Well, basically I have this code that I want to put on my website to show if the server is up or down and the ping of it. But in order to do that I must first place it in a PHP Block. the problem is... I don't know what a PHP Block is and how to make one. Here is a link to the page that has the code and some information: Website Server Status Code Page

If anyone could help me with this and maybe explaining in a little detail(if you want, if not I understand) of how to make this or how to get this working it would be much obliged. Thank anyone for their time in explaining this to me. =)
__________________
Join me and my friends in Khan Wars 2.0: Clan Merciless
Think you can beat [OCN]Blade? Give it a try...


New i7 Rig Project

— Funds: $-267/$1,169
[|||||||||||||||||||||||]

System: Fury
CPU
Intel Core 2 Duo E6750 @ 3.5GHz
Motherboard
ASUS P5K-E/WIFI-AP LGA 775 Intel P35
Memory
GeIL Esoteria 4GB(2 x 2GB) DDR2-800
Graphics Card
SAPPHIRE HD4870 1GB 256-bit
Hard Drive
2xWD 160GB(Raid 0) | 1xWD & 1xSAMSUNG 750GB
Sound Card
X-Fi XtremeMusic
Power Supply
Rosewill RX750
Case
RAIDMAX Sagitta 2
CPU cooling
Tuniq Tower
OS
Microsoft Windows 7 Ultimate x64
Monitor
24" Gateway 1920x1200 | 22" Proview 1680x1050
Overclock.net - 2009 Chimp Challenge Champions
†Blade† is offline   Reply With Quote
Old 10-03-09   #2 (permalink)
First Time Build
 
intel nvidia

Join Date: Feb 2006
Location: pa usa!
Posts: 1,768

Rep: 63 uberjon is acknowledged by some
Unique Rep: 53
Trader Rating: 0
Default

are you using tiny portal? (note: tiny portal works as an package-addon for SMF 'simple machines forum software')

if you aren't using both (or either) it would be more difficult to help you.
__________________
8800GT FTW
Quote:
Originally Posted by DontPassTheFence View Post
Holds true to today, I'm 21 and still a punk kid at heart XD (but Im packing broadband now, woo hoo dL`in pr0nz up to 49877489187327 times faster)
^ best quote ever!!! ^

System: to big yet not big enough
CPU
e6600 stock/3ghz
Motherboard
asus p5b deluxe
Memory
ddr2-800 xms2 2x2GB + 2x1GB
Graphics Card
evga 8800gt 512MB
Hard Drive
perc5i 4x 36GB 15k SAS raid0
Sound Card
razer ac-1
Power Supply
750 watt silencer
Case
mozartTx
CPU cooling
infinity
GPU cooling
stock
OS
vista 64bit
Monitor
22 inch ws proview lcd (love it)
uberjon is offline   Reply With Quote
Old 10-03-09   #3 (permalink)
WaterCooler
 
RAND0M1ZER's Avatar
 
intel nvidia

Join Date: Oct 2008
Location: Toronto
Posts: 862

Rep: 52 RAND0M1ZER is acknowledged by some
Unique Rep: 48
Trader Rating: 0
Default

Change your .html page extension to .php then wherever you want the php code put it inside like this:

<?php
--php code goes here
?>

It won't work if you keep the html extension
__________________
Quote:
Originally Posted by gbyss View Post
at first glance i thought he was gonna have 932 pictures of his system

System: HAF to HAF it!
CPU
Q6700
Motherboard
EVGA 780i
Memory
OCZ HPC DDR2-1066 (2 x 2gb)
Graphics Card
BFG GTX 275 OC
Hard Drive
Seagate 500gb 7200.11
Power Supply
Zalman 850w Modular
Case
Coolermaster HAF 932
CPU cooling
Swiftech Apogee GTZ Waterblock
OS
Windows 7 Ultimate RC1 (Build 7100)
Monitor
Samsung 19" 920NW
RAND0M1ZER is online now   Reply With Quote
Old 10-03-09   #4 (permalink)
New to Overclock.net
 
intel nvidia

Join Date: Dec 2008
Posts: 26

Rep: 4 Ectrian Unknown
Unique Rep: 4
Trader Rating: 0
Default

Like randomizer said, copy all of the code, place it inside PHP tags like so:

Code:
<?php
//---The code you copied goes here.
?>
Save it as a php file, for example status.php

Then upload it to your web server and go to it (http://www.yoursite.com/status.php)
__________________
System: O.o
CPU
Q6600 G0 @ 3.0
Motherboard
EVGA nForce 680i
Memory
4gb DDR2
Graphics Card
EVGA 9800 GT @ 700/1000/1750
Hard Drive
600gb
Sound Card
X-Fi XtremeGamer
Power Supply
700w
OS
Windows Vista Ultimate x64 / Linux Mint x64
Monitor
22" Samsung 2253BW
Ectrian is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -5. The time now is 05:28 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.11251 seconds with 8 queries