Creating Subdomains


hi,
Recently i have purchase Basic Windows plan from cpwebhosting.net, now i want to create subdomain . Plz. help

A subdomain is a lower level domain. It is added on the left of the domain name, e.g. subdomain.example.com. You can create as many subdomains as allowed by the plan. Domains and subdomains have equal functional capabilities, including web site management, e-mail service, FTP, dedicated IPs, etc., but subdomains do not have their own DNS zones and usually cost less.

To create a subdomain, go through the following steps

1. Select Domain Info link in Domain Settings menu in user’s Control Panel.
2. Click Add in the Sub Domains field. You will be asked to enter the subdomain name
3 Enter the new subdomain. It will be displayed in the Subdomain field of the Domain Settings page.

search engine script


Hello,
Does anyone tell me a good search engine script for my own website.

Use Brian Huisman’s Orca search.You can run the spider on set intervals via CRON or manually.

Use google API, Its great.

PHP Dig or PHP Digger is great.

To run H-Sphere in debug mode


To run H-Sphere in debug mode:-

1. Compile classes with debug information:

./configure -javac –with-params=”-g”
make shiva

2. Set the following option “on” in jserv.conf to be able to launch JServ manually:

ApJServManual on

3. Create debug.sh shell script to run JServ in debug mode:

#!/bin/sh
properties=/home/shiva/apache/etc/jserv.properties
log=/home/shiva/apache/logs/jserv_manual.log
CLASSPATH=$CLASSPATH:/usr/local/java/JSDK2.0/lib/jsdk.jar
CLASSPATH=$CLASSPATH:/usr/local/apache/libexec/ApacheJServ.jar
java -Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y ,suspend=n
org.apache.jserv.JServ $properties $1 2 >> $log
# address=9999 – port to which the debugger may be attached
# choose any available port you like

4. In IDE, set the following debug configuration:

Transport: Socket
Debuger Mode: Attach
Host: localhost
Port: 9999

5. Start Apache and run debug.sh after Apache start. Set IDE breakpoints and launch debug from IDE.

how create a msgbox with php ?



Is it possible to create a msgbox with php ???

I want to check the matching of two password fields and display a msgbox with “password not match” !!!

Try this in php:

if($pass1 != $pass2){
echo “<script>alert(“The two password did not match.”);</script>”;
}

Yes, you can do it by printing out javascript code. A google search will give you some great examples. javascript:alert(‘text here’);
If you want to do it within the page you can modify the innerHTML of a div or use a text input field set to readonly which displays the alert.

TimeUtils class


The TimeUtils class is designed to subsitute all other H-Sphere classes dealing with time. This class is needed for testing any H-Sphere features that use time ( like accounts, domain registration renewals, and the like ).

TimeUtils wrappers should be used instead of any other Date/Time functions:

System.currentTimeMillis() = TimeUtils.currentTimeMillis()
new java.util.Date = TimeUtils.getDate()
Calendar.getInstance() = TimeUtils.getCalendar()
Thread.sleep(s) + TimeUtils.sleep(s)

Other utilities HIGHLY recommendable for usage:

java.sql.Date getSQLDate()
java.sql.Timestamp getSQLTimestamp()
java.sql.Time getSQLTime()
java.util.Time getTime()

external credits, or external charges


external credits, or external charges are the charges exported from external billing systems.

External charges are stored in the external_credits table. The ecCron internal CP cron adds charges from external billing software to the external_credits table as the accounts’ credits.

To set the time interval when ecCron is launched, you need to add the following line to hsphere.properties:

EX_CHARGE_CRON=5

In the above example, ecCron would start every 5 minutes.

The external_credits table is created during H-Sphere upgrade and has the following structure:

CREATE TABLE external_credits (
id int NOT NULL,
account_id int4,
amount float,
created timestamp with time zone,
description varchar(128),
PRIMARY KEY(id)
);

Chosen PHP and MySQL for web development


Dynamic websites are made in order to achieve great success with its best features providing good medium to run better functionality. Best web hosting service package includes database feature which will be integrated into a website. It provides RDBMS. If a user will choose Windows web hosting then it includes MSSQL database while choosing Linux web hosting MySQL database is provided. To make the data retrieval easy and fast the data in the database should be in the tabular format. Some advantages of database driven websites are:

Security:

To store the databases it is essential to protect it from unrestricted users. For example, the details of login are stored in a text file and can be accessed from authenticated script. With databases, entries can be encrypted through hash algorithm and thus providing a secured environment. Therefore, to access database one should specify the login details which is not provided easily by simple text file.

Efficiency:

As per the storage of data in tabular form the retrieval has become more efficient. SQL stores the data to make the smooth functions of website. With database system developers can update, modify and alter the columns and rows to meet the desire requirements. RDBMS has some inbuilt mechanisms which makes it more desirable database system to store the data.

Administrative control:

A database system has some control mechanisms allowing casual administration of database and tables connected with it. To access the database each user is provided with some rights and allows restrictions to protect the data from being altered and modified. Database administrator has full control over database system so that he or she can squeeze the database settings such as connection speed, restricting the flow of data, maximum number of server connections and to perform a specific query allocated hardware resources can be adjusted.

Some benefits with database system to an organization:

  1. Website can be more dynamic.
  2. It make loyalty.
  3. More visitors are encouraged to return on site and it makes growth of audience.
  4. It provides information regarding views about products/services of online users.

User’s business will be automated by a database driven website to earn big profit. It will be available with all hosting packages. To make secure website user has the database administrative control to allow the restrictions.

To set individual interface preferences


Customers are being provided a facility to set individual interface preferences: preferred design (skin), icon set, or language – for a particular account.

This can be implemented within an H-Sphere template by using the following Freemarker commands:
<assign res = account.preferences(“KEY”, “VALUE”)> – set account preferences.

Here:

KEY is the key of an interface preference to be assigned to an account (up to 64 chars),
VALUE is its value (up to 256 chars).

The following keys are available in H-Sphere :

design_id – preferred design id (in design_config.xml);
icon_image_set – preferred icons image set (in design_config.xml);
skill_icon_set – preferred icons skill set (in design_config.xml);
lang – preferred language.

For example, to assign the XPressia design for an account:

<assign res = account.preferences(“design_id”, “xcp”)>

<assign property1 = account.preferences(“KEY”)> – retrieve account preferences.

PHP and MySQL easy to use, fast, free, and powerful


I have found, both PHP and MySQL easy to use, fast, free, and powerful. They have helped in getting my dynamic Web site up quickly, I think, there are no better choices.

The PHP scripting language was built for the Web in which MySQL excels at
tasks common to dynamic Web sites. All the tasks common to Web development can be accomplished in PHP with an absolute minimum of effort.

Script-runner


Script-runner is a utility that launches H-Sphere scripts on Unix/Linux servers.
For this, H-Sphere control panel establishes an SSH connection with a Unix box and runs script-runner:ssh -a -x root@xxx.xxx.xxx.xxx /hsphere/shared/scripts/script-runner.plFurther, the control panel sends commands to the output stream of the SSH session and script-runner reads and performs the commands and then outputs.

The format of command passed to script-runner is:
COMMAND=command_name&PARAM1=param1&..&PARAMN=param n&INPUT=inputn
It starts with the keyword COMMAND followed by actual command. Then, if necessary, it’s followed by the parameters that are numbered from 1 and further. All parts of the command are separated with the ampersand (&). The ‘=’ symbol is followed by the value. The command ends with the line feed character.

If the command requires standard input, you should set the INPUT parameter. Commands are passed in the 8-bit ASCII encoding. Command parameters and standard input are passed in the URL-encoding.
Script-runner returns output in the following format:
OUTPUT=some_output&ERROR=text_of_error_or_empty_st ring&EXIT_CODE=0
If there is an error during script execution, parameter ERROR will contain the error text and output code EXIT_CODE will be nonzero. OUTPUT is a standard script output.

To check if script-runner is ready to accept commands, use ‘PING’ command. You should get the ‘PONG’ output.

Script-runner 1.8 logs all executed scripts and their output. They can be found in the /var/log/scriptrunner directory on the box where script-runner is running.