Web Pipe
Sportsbook Core
About Us
Contact Us
Products . jScripter . Variables Sign In

Variables mentioned below should be treated as constants. Because of javascript flexibility we can not disallow you to change them in your code. But all changes will have absolutely no effect.


Integer, debug level (sometimes called verbose level). Corresponds to -vN command line parameter.

Useful when you need to hide debug/test messages when running in release mode.

Default value: 0


	if( debug >= 2)
		Print( "Sbcore version is ", version );


String, current application directory, without trailing slash

It can be changed with -d command line parameter under Windows and Linux.

For Android it's something like: /storage/emulated/0/Android/data/com.scraper/files.


	Write( directory + "/test.txt", "Hello, world!" );


String, current Scrapper application version.


	Print( version );


Object. Information about current device. It has the following fields:

computer.uuid32-character string. MD5 hash of unique computer identifier. Different devices will have different UUID.
computer.mac12-character string. mac-address of computer's NIC.
computer.os.nameOperating system name. One of the following: Windows, Linux, Android
computer.os.versionString. Operating system version.
computer.deviceString. Device name. Available for Android only.


	if( "Android" ==
		Print( "Hello, Android!" );


Object. Application local storage. Storage file may be specified either in command line with -s parameter, or with Load method. Storage is the same for all workers. It has the following methods:

Get ( key )returns the value previously set with Set
Set ( key, value )sets value for specified key
All ( )reurnd JSON of all key-value pairs
Load ( fpath )Loads the data from give path. Also, this path will be used for saving data back to file.


	// set storage file
	// get previous value
	var str_counter = storage.Get("counter");
	// convert it to number
	var counter = str_counter ? parseInt(str_counter) : 0;
	// increment it
	// save it back. Note: second parameter is string.
	storage.Set("counter", counter.toString());
	// This will output incremented number every new run of the application
	Print("Counter : ", counter);
	// Now, let's see what is is storage
	var all = storage.All();
	Print("Storage content: ", JSON.stringify(all));
	// The output:
	Counter : 3
	Storage content: { "counter": "3" }


This is special URL of the proxy checker service we developed. It returns simple JSON like this:

		"address": {
remoteremote address of endpoint
forwardedX-Forwarded-For value of HTTP header. Optional.
realX-Real-IP value of HTTP header. Optional.

Here is a sample code of simple proxy checker.

See also
mobile version Copyright © 1999-2023 SoftCab, Inc. All Rights Reserved ·