HTTP
From Hack Wars Wiki
Contents |
Introduction
HTTP programs have two main uses:
- they let you have a website
- they let you collect your Daily Pay
In order to do these things, you must have:
- an HTTP program installed on a port
- an HTTP program turned on, and set to default
Gaining HTTP Experience
There are 4 ways to gain HTTP exp
- Changing the Daily Pay IP address on HTTP ports ( 10 xp + 10 xp * target's HTTP level )
- Receiving votes from other players ( 500 xp / vote)
- Receiving your own or other players redirected daily pay (10 xp * original receivers HTTP level )
- Compiling HTTP scripts (0.1 xp * compile cost ).
Anatomy of an HTTP Script
HTTP programs have 3 main entry points.
Enter: This function is called when someone goes to your site.
Exit: This function is called when someone leaves your site.
Submit: This function is called when someone submits a form on your site.
Script Example
message(getVisitorIP(), "Welcome to my site");
The script above will be put in the Enter part of the HTTP script. When ever someone visits the site they will get that message.
Your HTTP port must be the default HTTP port for the website to run properly.
