before buy a website that already have a space, you must know that you don't need it, you can manage your website from your own server-host.
there are more ways for install a webserver on your host, a good way is already explained by castor:
using apache.I start to explain how to install a webserver and configure it using IIS.
Installation IIS
1. Click Start -> All Programs -> Administrative Tools -> Server Manager.

2. In the Server Manager window, scroll down to Roles Summary, and then click Add Roles. The Add Roles Wizard will start with a Before You Begin page.
3. Select Web Server (IIS) on the Select Server Roles page. An introductory page will open with links for further information.

4. Select the IIS services to be installed on the Select Role Services page. Add only the modules necessary and click Next.

5. Add any required role services.

6. IIS is now installed with a default configuration for hosting, enable the "CGI" checkbox under "Application Development" and click Next

7. Confirm that the Web server works by using
.PHP Configuration
1. Download
, open it, go on Products and search 'PHP 5.3.28' press Add on the right of the page under the php version and press install.
2. now open 'Internet Information Services(IIS) Manager' in the "Features View" page open the "Handler Mappings" feature.

3. In the "Actions" pane click "Add Module Mapping..." and enter the following:
Request path: *.php
Module: FastCgiModule
Executable: C:\[Path to PHP installation]\php-cgi.exe
Name: PHP_via_FastCGI
Click "Request Restrictions" button and then configure the mapping to invoke handler only if request is mapped to a file or a folder, and click ok on all dialogs for safe the configuration.
and again "Add Module Mapping..." and enter the following:
Request path: *.php
Module: FastCgiModule
Executable: C:\[Path to PHP installation]\php-cgi.exe
Name: PHP53_via_FastCGI
Click "Request Restrictions" button and then configure the mapping to invoke handler only if request is mapped to a file or a folder, On Verbs select "One of the following verbs" and in the space insert 'GET,HEAD,POST', click ok on all dialogs for safe the configuration.
(Can be that after install the php version using the web platform installer this step is automatically done by the program)

4. Now select 'root' under "Sites" and open the "Default Document" feature. Select index.php and move it Up to first position (if don't exist add ''index.php" and move it at first position).

5. Now open MIME Types and press on Add..
File name extension: .ini
MIME type: text/plain
and OK. Now again Add..
File name extension: .patch
MIME type: application/octet-stream
OK. (this is needed for make work your updater)
6. Now open Program Files(x86) --> PHP --> v5.3 --> php.ini
on line 226 edit short_open_tag = On
7. Open the folder C: --> root delete all what there is and with your text editor create index.php
PHP Code:
<!doctype html>
<html>
<body>
<?
phpinfo(1);
?>
</body>
</html>
if work you have succesfully installed and configure PHP on IIS.
if don't work please check your error using google before ask here about a solution!
Web Site Start
This is only a quickly introdution to html side of a website, but i can't explain you how to create a template by 0, so i give you only some suggestions.
First of all you need a template and i suggest you to steal it from another website (always make a new one is better, but if you don't have experience you can learn more by a website that is already maked).. download
search a website that you like and follow the instruction on this program for take the html/css codes. copy your 'new' template in the folder "root". now you have html,css,javascript that you can reconfigure as you like, but not php. You can show your result opening it by your url "localhost/.."
Now you need a web editer and i suggest this one that is free:
Open Brackets and on the left open folder (root). Rename all .html files to .php (remember you need to edit in your website menu/buttons all the path from .html to .php). The next step you must make alone using a bit of intelligence and searching the language words that you don't understand. You need to make now your website and the only suggestion that i can give you is to learn more using this tutiorals:
I hope you will quickly learn to edit the html pages and the css.
For css a good way for edit is directly on your browser, open your website, press rightclick, press on 'Inspect Element' and you can manage from there your style editing and then replacing the codes on the css file.
You can already go on your website in remote using your IP, or you can register your self on
for have a free url, or if you want to buy a web domain i suggest you to buy it on
where the .net cost only 9eu/year or check for a domain that have a lower cost. Remember, you don't need a webspace, u need only a domain and the staff will help you to configure your webhost to the domain name!Web Services using PHP
Php start ever with this command
PHP Code:
<?
PHP Code:
?>
You can open and close it where you want inside a php page, the fine of php page is that read as html when php is closed. For insert a text or a html language in php the line must be similar at this:
PHP Code:
echo "example text";
Here is a tutorial for learn how to use php:

You can add every php script that you have found for shaiya simple with a include or copying the script in one of your pages and not need to use iframe.
the include function is very simple: insert this php code in your own php page where you want show it editing the path:
PHP Code:
<?
include('./path');
?>
PHP Code:
// Connect to MSSQL server with Shaiya credentials using PDO
$sqlUser = 'User'; // YOUR SHAIYA ACCOUNT NAME
$sqlPass = 'Password'; // YOUR SHAIYA ACCOUNT PASSWORD
$database = 'PS_UserData';
try {
$conn = new PDO("sqlsrv:Server=127.0.0.1;Database=$database", $sqlUser, $sqlPass);
}
catch (PDOException $e){
die($e->getMessage());
}
Now make a top account info using php, you need to add this script after the tag <body> in every web page or make it in a clean php page and call with a include.
PHP Code:
<?
if (session_id() == ""){
session_start();
}
if(!isset($_SESSION['UserUID'])){
$uid = 0;
}else{
$uid = $_SESSION['UserUID'];
}
include('./inc/pdoConnect.php');
// Account name
if ($uid != 0){
$query = $conn->prepare('SELECT UserID FROM PS_UserData.dbo.Users_Master WHERE UserUID=?');
if ($query != null){
if ($query->bindValue(1, $uid, PDO::PARAM_INT) && $query->execute()){
$name = $query->fetch(PDO::FETCH_NUM);
$usrname= $name[0];
}
$query->closeCursor();
$query = null;
}
// Account Points
$query = $conn->prepare('SELECT Point FROM PS_UserData.dbo.Users_Master WHERE UserUID=?');
if ($query != null){
if ($query->bindValue(1, $uid, PDO::PARAM_INT) && $query->execute()){
$point = $query->fetch(PDO::FETCH_NUM);
$usrpoint = $point[0];
}
$query->closeCursor();
$query = null;
}
$conn = null;
} else {
$usrname= "Guest";
$usrpoint = "No";
}
?>
<div style='float: right; text-align: right;'>
<?
echo "Welcome ".$usrname ." </br>You have " .$usrpoint . " points";
?>
</div>
now you can proceed to login section button, insert where you have your login/logout button and edit only the <a></a>:
PHP Code:
<?
if ($uid == 0){
echo "<a href='login.php'>Login</a>";
} else {
echo "<a href='logout.php'>Logout</a>";
}
?>
Replace your template and in the middle insert this script:
PHP Code:
<?
// placeholder for invalid verification attempt
$verificationFailed = false;
// upon form validation, this page is processed with posted params, check them
if (isset($_POST['name']) && isset($_POST['pass'])){
// enable cookies
session_start();
// clear any previously defined IDs
if (isset($_SESSION['UserUID']))
unset($_SESSION['UserUID']);
// connect to database using a PDO
include('./inc/pdoConnect.php');
// setup a query to get information on player account
$query = $conn->prepare('SELECT UserUID, Pw, Status FROM PS_UserData.dbo.Users_Master WHERE UserID=?');
if ($query === false)
die(FormatErrors($query->errorInfo()));
// bind the parameter
$query->bindParam(1, $_POST['name'], PDO::PARAM_STR);
// execute the query
if ($query->execute() === false)
die(FormatErrors($query->errorInfo()));
// get response (a single row is expected)
$row = $query->fetch(PDO::FETCH_NUM);
if ($row == null){
// UserID was invalid, loop back on login form or display error or ...
$query->closeCursor();
$verificationFailed = true;
}
else {
$uid = $row[0];
$pwd = $row[1];
$status = $row[2];
$query->closeCursor();
// verify password, depending on actual DB you may have to verify a hash
if ($pwd == '' || ''.$pwd != $_POST['pass']){
// password was invalid
$verificationFailed = true;
}
else {
if ($status == '-5'){
$query = null;
$conn = null;
// redirect to ban section
header("Location: ban_status.php?uid=".$uid."");
exit();
} else {
// UserID / Pwd are valid, store the UserUID (the numerical unique ID)
$_SESSION['UserUID'] = $uid;
// release resources
$query = null;
$conn = null;
// redirect to Char selection page
header("Location: index.php");
exit();
}
}
}
}
// we continue with html code in case of error or first display (no form validated)
?>
<style>
#login {
background: url('./png/login.png') no-repeat right top;
color: #ffffff;
font: normal 9pt Verdana, Arial, Helvetica, sans-serif;
margin: 0px;
padding: 0px;
position: relative;
margin: 0 auto;
width: 252px;
height: 200px;
}
#login p{
text-align: center;
}
#login form {
position: relative;
padding: 50px 20px 0px 20px;
}
label.capt {
display: inline-block;
font: normal 9pt Verdana, Arial, Helvetica, sans-serif;
width: 70px;
padding: 4px 0 6px 0;
}
#login input {
width: 130px;
}
#login #submit {
margin: 0;
padding: 0;
width:100%;
text-align: center;
}
#login input.btn {
color: transparent;
background: url('./png/ok.png') 0 0;
border: none;
margin: 0;
padding: 0;
height: 26px;
width: 65px;
}
#login input.btn:hover {
background: url('./png/ok.png') 0 -26px;
}
</style>
<div id="login">
<form method="post" action="login.php">
<label for="name" class="capt">User ID:</label>
<input id="name" name="name" type="text"/>
<br/>
<label for="pass" class="capt">Password:</label>
<input id="pass" name="pass" type="password"/>
<br/>
<? if ($verificationFailed){ ?>
<p>The ID and/or password was invalid. Type in them carefully.</p>
<? }
else { ?>
<p>Please type in your ID and password to login your game account.</p>
<? } ?>
<div id="submit"><input type="submit" value="OK" class="btn"/></div>
</form>
<a style="float: right; color: white" href="recover.php">Recover Date</a>
</div>
</body>
</html>
and insert it in root. (my script is a bit different on the ones from castor so better if you use this but you can work with the files that castor had relase on him thread [how To]Shaiya Web Service. this script have days bann and recover date inside.)The logout.php must only contain this code:
PHP Code:
<?
session_start();
$_SESSION = array();
session_destroy();
header("Location: index.php");
?>






