Monkuar
Members-
Posts
987 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Monkuar
-
The forums look really nice and the fastest ipb 3.1+ board i've ever been on, faster than the official support forums.. lol good work! Bye Bye to SMF!!!!
-
Nice!! Sorry for the multiple account, you can delete ha. These forums look absolutely FANTASTIC. Funny thing is, these are the first IPB 3.1+ Boards that actually got some speed to em... good work!! Nice and snappy for IPB I like
-
hey guys this is monkuar when i try to login I get "you're not allowed to visit this community?" hope im not banned...................
-
You can use http://php.net/manual/en/function.file-get-contents.php to get data from your .txt file
-
You most likely will be better of posting your result here http://forums.phpfreaks.com/index.php?board=8.0
-
Regex to prevent people to stop posting just "quotes"
Monkuar replied to Monkuar's topic in Regex Help
FINISHED AND SOLVED BABY!!!! I AM PRO $checkquoteonly = substr($text, -13, 13); $checkquoteonly2 = substr($text, 0, 9); //Check if the first text contains "Quote" $check1 = stripos($checkquoteonly2, 'quote'); /* echo $checkquoteonly .'<br>'; echo $checkquoteonly2; */ if ($check1 == true){ if ($checkquoteonly == '--endquote-->'){ message("You must enter a complete message."); } } --endquote--> is what parses the quote message in my text into HTML, I just put a "<!--endquote-->" at the end of each quote so I can catch it it in the substr. I only substr the --endquote-> part because if I did "<!--endquote-->" it wouldn't return any characters, it's bugged at ! question mark. (PHP BUG) So then I checked if the first 9 characters of the string if it contained "quote" in them using stripos like ChristianF said Then, ya u can see the rest of the code, Thanks ChristianF Topic solved! Only problem now is if someone does: Quote: <--put quote message here --> but I will just make a <!--quotestart--> when the text is being converted and switch it up just people don't say Quote: then link to a quote... topic solved ty -
Regex to prevent people to stop posting just "quotes"
Monkuar replied to Monkuar's topic in Regex Help
BAM substr('[quote=ROFL]hey ChristianF PPHPFREAKSz[/quote]', -8, ; // f echo's . Now how do I check if text is posted above a [quote=hey,January 1th] hey [/quote] tag? -
No it wasn't. well i figured you guys would have switched aLOT earlier if it wasn't.. but I didn't want to be disrespectful :o
-
Mahngiel has made some great points.... IE10 took forever. .josh made some good points too, ie 9 is okay they all have their problems and stuff but i think it's safe to say that the only reason ie has any market share is because it comes pre-installed on windows..... lmfao other than that, it's complete trash
-
I think I might be over-thinking this.. but let's say a user on my board decides to post [quote=Fred]hello everyone[/quote] Is there a way, I can check server side if no text or characters are used after " "? "Error!, You cannot post just a quote, you need to enter a post". This is because I don't want peeps just posting with a quote, they should atleast reply/say something u know? Or maybe instead of me just asking for help all the time I think a little? So that's what I did, my only solution would be to do something like this: substr("[quote=Fred]hello everyone[/quote]", -1); but this would only return "]", how can I make it return 7 more characters, so I can just check if "" is the last string used, and if it is, then error the user out! or do you think regex would be appropriate here? Which one is better for performance for large body of text, < 12,000 bytes (TEXT) MYSQL field??
-
Well, It will just be store basic html so I can use terms.html wherever I want globally. I guess I will just leave it like it is, maybe put a strlen max characters or something. Thanks all
-
smf fail here, nothing to do with phpf, lol so funny so glad we moving away from smf such shitty software hehe was good while it lasted though!!
-
do we need to escape data that is entered into fwrite into a file? my code: $fh = @fopen('terms.html', 'wb'); fwrite($fh, ''.$_POST['Post'].''); fclose($fh); simple terms of service here, should i do mysql_real_escape_String and other sanitizing options or is it fine? will it ever result in an error if someone injecting malicious code?
-
yeah it probably depends I guess who is hosted with them or whatnot, but you have see, that guy got null routed for 24hours and was trying to get customer service to help him and get information from the attack and was denied plenty of times, that == horrible customer service i know and agree with you. your experience with them are probably great and they might be a good company but all companies have weaknesses and stuff. the point i was trying to make is that Nyphrex just cant come in here and say "Hey This hosting provider is great!" and say "It was Linode!" w/o any sauce or anytype of review or confirmation that he actually has sites hosted with them, which indeed makes his point completely useless, until I stepped in and gave him a full out negative review, just proving my point that he should atleast make an effort to explain "WHY" that host is good. (forgive my grammar...) Now, if that user had a "GURU" tag or something to show proof that he was reputable or known , then yeah I wouldn't of replied, but someone just cannot come in here say "OH this hosting company is great!" w/o any sauce or legitimate review/etc/etc...
-
Linode? Overpopulated crowded as hell with 0 customer service? Sauce: http://www.lowendtalk.com/discussion/4706/why-linode-sucks-a-personal-rant/p1
-
http://forums.phpfreaks.com/index.php?topic=365312.0 As in this, I think they should add a parameter to be set true or FALSE while using in_array to specify a string match. Let's say I don't want to find the whole array, just to match a particular string or whatever. Pyscho already posted a fix to it, but would be a plausible idea for PHP6. Would be helpful as well. Cheers
-
And why would you expect a function to do something it was not designed to do because YOU have a particular need? There are functions to do "key" things and then it's up to the programmer to put on his thinking cap and write some logical code. As to my function, it works perfectly fine. I specifically stated that the function should work similar to in_array(). So, you should use it the same. The function will return the INDEX of the found value. That index could be a '0' which will resolve to FALSE if a loose comparison is done! If you do not do an IDENTICAL (comparison) and the returned index is 0 you will be running the wrong logic. Your responses in this thread and another one today are showing a lack of attention to detail that is making it frustrating to even provide help to you. if (str_in_array('1', $tickets) !== false) { echo "Yes I found a match"; } NICE!! //*Match 4 numbers in the wrong order win 20% of the jackpot. (Odds: 1 in 417) if (!in_array($winning_number, $tickets[$dailycheck['user_id']]) AND (str_in_array(''.$winning_number[0].'', $tickets) !== false) AND (str_in_array(''.$winning_number[1].'', $tickets) !== false) AND (str_in_array(''.$winning_number[2].'', $tickets) !== false) AND (str_in_array(''.$winning_number[3].'', $tickets) !== false) ) { $jackpot20 = true; //other code sniped } Pretty much now, it will check each ticket number per user, per user. This is to detect if a user selected all 4 numbers right, but in the incorrect ORDER, as in the !in_array. Then I just do your beautiful function str_in_array to check if each value has all 4 numbers but not in the correct order (HENCE !in_array IF) , works beautiful, topic solved.. I love foreachs and each time you help, you might not really "Think you're helping" but each time, I do come closer and closer on learning foreaches, I mean look back 1year ago, I was asking questions where as NOW I know off the top of my head, i'll get there sooner or later... Thanks, solved. Maybe in a new php version they will add a parameter to the in_array function so we can search for str like your function does? Would be nice. Doesn't matter now though since I know how to though eh? I made a suggestion on the php5-6 wishlist, hope they consider
-
Welcome Robbie to PHPFreaks! I am glad you made it here, this forum is very nice. You will receive help wherever you find a forum to post in. You may even glance over to the freelancer section as well if you're trying to meet a client or find someone to do work for you, or for you to do work for them. You definitely got yourself a warm welcome from me, can you give me more information about Ark International? I never heard about this corporation before. And I will make sure to check out your post in the work forum already, well that's it AFAIK. Hope you enjoy your time here, PHPFreaks IMO, is the #1 source for php related questions and answers, dreams really do come true here. See you around the forums Robbie. Also, if you have any questions pertinent to PHPFreaks or the forums, just pm me, I can lead you into the right direction 99% of the time, if I cannot find an answer, I will get helps from a mod for you. Sincerely, -- Monkuar
-
This section: http://forums.phpfreaks.com/index.php?action=profile;area=forumprofile;u=78660 When we click on actors, I was wondering if you guys can add this actor to the list to be chosen: https://www.google.com/search?aq=f&sugexp=chrome,mod%3D5&q=Bruce+Marchiano&um=1&ie=UTF-8&hl=en&tbm=isch&source=og&sa=N&tab=wi&ei=9JZYULyJLKfriQK6h4CwDQ&biw=1920&bih=967&sei=9ZZYUMzOKOWciQLY3IAI Maybe on the new board too? Thanks specifically this one maybe:
-
Lol who the hell hosts with GoDaddy? SOPA bitch @ss company. company needs to vanish They vote for SOPA, get DDOS'd... and even other hosting companies use coupon codes "GODADDYSUCKS2012" for free domain transfers, lmao godaddy is complete garbage. also they make u pay extra 10$ for domain whois protection, when dreamhost offers for free? Keep on derpin GODADDY
-
Okay, i'll use kickens then, does look nicer. topic solved... I just don't really like to use code that i don't know much about, so i had to read the manual documention for str_pad before using, but i've switched my $var1.$var2.$var3.$var4 crap out, thanks. now it looks nice and spiffy
-
Yes, Putty is connect to your VPS Via SSH I use a lot it alot to install scripts and such, like lamp scripts, php/mysql/nginx via command prompts i didn't mean to come of as rude, i just thought you was editing stuff via command line, and was wondering why, even you said jedit and stuff you edit with as well, so I apologize i was just trying to strike up a conversation >_<
-
FileZilla is #1