Jump to content
xisto Community

coolcat50

Members
  • Content Count

    303
  • Joined

  • Last visited

Posts posted by coolcat50


  1. I think you might have just fixed my script. Thanks Rvalkass!Also, I use the $string array to get rand numbers and replace 10-35 with letters. That is the only way I know how to randomize letters.EDIT:I made the $string array global inside of the function and changed the $i++ to $a++ and it now works.Completed script:

    <?php//This PHP script will generate a random array and turn it into a string consisting of 0-9 and A-Z.//	This is the first developmental version.//Create 10 item array for string$string = array(0,0,0,0,0,0,0,0,0,0);//Create function to replace 10-36 with A-Zfunction conToStr() {	global $string;	for ($a = 0;$a<=9;$a++) {		switch($string[$a]) {			case 10:				$string[$a] = 'a';				break;			case 11:				$string[$a] = 'b';				break;			case 12:				$atring[$a] = 'c';				break;			case 13:				$string[$a] = 'd';				break;			case 14:				$string[$a] = 'e';				break;			case 15:				$string[$a] = 'f';				break;			case 16:				$string[$a] = 'g';				break;			case 17:				$string[$a] = 'h';				break;			case 18:				$string[$a] = 'i';				break;			case 19:				$string[$a] = 'j';				break;			case 20:				$string[$a] = 'k';				break;			case 21:				$string[$a] = 'l';				break;			case 22:				$string[$a] = 'm';				break;			case 23:				$string[$a] = 'n';				break;			case 24:				$string[$a] = 'o';				break;			case 25:				$string[$a] = 'p';				break;			case 26:				$string[$a] = 'q';				break;			case 27:				$string[$a] = 'r';				break;			case 28:				$string[$a] = 's';				break;			case 29:				$string[$a] = 't';				break;			case 30:				$string[$a] = 'u';				break;			case 31:				$string[$a] = 'v';				break;			case 32:				$string[$a] = 'w';				break;			case 33:				$string[$a] = 'x';				break;			case 34:				$string[$a] = 'y';				break;			case 35:				$string[$a] = 'z';				break;			default:				//Number is 0-9				//We just keep it as it is				$string[$a] = $string[$a];		}	}}							//Create rand number loop for array sections and insert rand num into array.for ($i=0; $i<=9; $i++) {	//Start rand function	$string[$i] = rand(0,35);}//Perform the conToStr() function with no argumentsconToStr();//Put the array into another variable as a string$product = implode('',$string);//Echo out the stringecho $product?>


  2. For some reason my random string script is not working. I got a fatal error when I tried it under XAMPP. I do not know why. It looks syntatically correct. Could someone help me?Here is the script: (Warning its over 100 lines long)

    <?php//This PHP script will generate a random array and turn it into a string consisting of 0-9 and A-Z.//	This is the first developmental version.//Create 10 item array for string$string = array(0,0,0,0,0,0,0,0,0,0);//Create function to replace 10-36 with A-Zfunction conToStr() {	for ($a = 0;$a<=9;$i++) {		switch($string[$a]) {			case 10:				$string[$a] = 'a';				break;			case 11:				$string[$a] = 'b';				break;			case 12:				$atring[$a] = 'c';				break;			case 13:				$string[$a] = 'd';				break;			case 14:				$string[$a] = 'e';				break;			case 15:				$string[$a] = 'f';				break;			case 16:				$string[$a] = 'g';				break;			case 17:				$string[$a] = 'h';				break;			case 18:				$string[$a] = 'i';				break;			case 19:				$string[$a] = 'j';				break;			case 20:				$string[$a] = 'k';				break;			case 21:				$string[$a] = 'l';				break;			case 22:				$string[$a] = 'm';				break;			case 23:				$string[$a] = 'n';				break;			case 24:				$string[$a] = 'o';				break;			case 25:				$string[$a] = 'p';				break;			case 26:				$string[$a] = 'q';				break;			case 27:				$string[$a] = 'r';				break;			case 28:				$string[$a] = 's';				break;			case 29:				$string[$a] = 't';				break;			case 30:				$string[$a] = 'u';				break;			case 31:				$string[$a] = 'v';				break;			case 32:				$string[$a] = 'w';				break;			case 33:				$string[$a] = 'x';				break;			case 34:				$string[$a] = 'y';				break;			case 35:				$string[$a] = 'z';				break;			default:				//Number is 0-9				//We just keep it as it is				$string[$a] = $string[$a];		}	}}							//Create rand number loop for array sections and insert rand num into array.for ($i=0; $i<=9; $i++) {	//Start rand function	$string[$i] = rand(0,35);}//Perform the conToStr() function with no argumentsconToStr();//Put the array into another variable as a string$product = implode('',$string);//Echo out the stringecho $product?>


  3. In this tutorial, I will show you how you can use Command Prompt to create text files. It is very simple and you can also use it to write output from a command into a text file. This can be particularly useful when you need documentation from a DOS program in a text file when you use the help command or something similar. In order to do this you simply use this DOS command.

    CONSOLE
    echo Text >> test.txt
    This will create a new text file called test and echo the contents into it. If we wanted to write a 2 line document, we could do something like:
    CONSOLE
    echo Hello >> test.txtecho Person >> test.txt
    The Command Prompt automatically does linebreaks each time the command is used.I also stated that you can put documentation into a text file this way.I will use the Perl documentation command as an example.
    CONSOLE
    perldoc perl >> perldoc.txt
    That will put the output from perldoc into the file perldoc.txt.Thanks for reading this material and have fun doing text writing the old school way.

  4. Zymic is a fairly decent host with a good amount of bandwith and storage available and is ad-free. It has a simple cPanel and does not really offer a lot of advanced features, but you do have PHP and MySQL with 5 MySQL Databases and Accounts available. They only allow one FTP username though, but all of your hosting accounts are linked to your Zymic account. They have PHP Safe Mode on though, so you might have some limited PHP features. I do not know about support because I have not really suffered much downtime and haven't needed it. You are able to have unlimited hosting accounts and you are able to use your own domain. A another feature they have that is pretty neat is PHPMyAdmin. I believe they are a good beginner's host or for personal websites. I am using it for a personal signature gallery to host my signatures without worrying about size as much.Service 8/10Support ?/10Features 5/10Overall 7/10I love it being ad-free and having a lot of bandwith and disk space, but features just truly lack.Xisto is awesome all the way, except for the not so high bandwith and disk space for 10 credit accounts. No biggy though.


  5. I actually came up with a script that does the job exactly. The only thing is that it is command prompt based. I do believe I have a Tk based one that I may post here. I would like to put a script like this onto SourceForge. Here is the command line script. I wrote this under Mac OS X at school.

    #pmode.pl: A Perl program designed to act similar to then Python interactive mode#	using the eval() function. It takes input from STDIN and evals it.$i = 5;while($i == 5) {	print "Perl<< ";	$code=<STDIN>;	eval($code);}


  6. I have used X10Hosting and I am fairly satisfied with it as well. I just do not like the ads though. The host is good and gives a lot of memory and bandwith for just a banner. You have to request for different PHP packages though and the intermediate one is required for most applications. I was surprised nobody has posted about this host.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.