Jump to content

Azu

Members
  • Posts

    1,047
  • Joined

  • Last visited

    Never

Everything posted by Azu

  1. Would somebody please tell me how I can create a varchar(MAX) row in MyISAM? I tried to make one in SQLYog but it errored =/
  2. I'm pretty sure session cookies only work for one computer that is connecting, and even then will only work if the client accepts session works, and thus they are client-side..
  3. Can someone please tell me if there is there some kind of plugin for PHP that will let me have a persistent array that will stay in memory even after the php process dies, and that all PHP processes will be able to access? Like some kind of $_SuperDuperImmortalGlobal['InterPHP'] that only goes away when the web server closes? And if there is, does it work with fastcgi? I don't care if it's free or not as long as it has good performance. Better performance then calling a database memory table over and over.
  4. Thanks, that isn't quite it though; when I use die, it still sends the headers and stuff to the browser, and lets it know that my site is on. I want to make it appear offline (not send ANY data back) when injection attacks etc are detected. So that it would seem like my internet cord is unplugged. So in their browser it says it failed to connect to server or whatever. So that it appears that my website is offline.
  5. Thanks ^^ the whole reason I am planning on using javascript though is to save bandwidth. I want to use external javascript to show my navigation menu, so it doesn't need to be downloaded over and over (which it should only do if javascript isn't supported) so I'd really appreciate it if there was some way to tell whether or not the client supports javascript. I guess I could include a javascript in every page that sends something to my server, and check on every page view if it was received or not, and store all the results in a mysql table, and then query the mysql every time a page is loaded to know whether or not javascript is supported, but this would put more load on the server, so I am looking for a way to quickly tell if it is on or off..
  6. Can somebody please tell me how I can make php instantly close and not even send a response header so that a browser trying to connect will get error saying cannot connect to server?
  7. Doesn't work Only applies to things that are just a single character long.
  8. Thanks, that doesn't work either though <?$this_is_how_it_looks_to_begin_with= "This is a teeeeest of repeating something over and over and over and over and over and over many tiiiiiimes like so so so so"; $this_is_how_it_should_look_afterwards= "This is a teest of repeating something over and over and over many tiimes like so so"; $str=$this_is_how_it_looks_to_begin_with; while($str!=$old){ $old=$str; $str=preg_replace('/((.)\2{2,})/','$2$2',$str);} //REGEX STUFF--------^----------^ echo"<style type='text/css'>@import'http://69.89.21.68/~freethep/.css';</style><center><table><tr><td>This is how it looks to begin with</td><td>$this_is_how_it_looks_to_begin_with</td></tr><tr><td>This is how it looks afterwards</td><td>$str</td></tr><tr><td>This is how it SHOULD look afterwords</td><td>$this_is_how_it_should_look_afterwards</td></tr></table>"; echo($str==$this_is_how_it_should_look_afterwards)?"It worked.":"It didn't work.";?>
  9. Thanks guys.. can you please tell me what I am doing wrong now? :s <?$this_is_how_it_looks_to_begin_with="This is a teeeeest of repeating something over and over and over and over and over and over many tiiiiiimes like so so so so"; $this_is_how_it_should_look_afterwards="This is a teest of repeating something over and over and over many tiimes like so so"; $str=$this_is_how_it_looks_to_begin_with; while($str!=$old){$old=$str; $str=preg_replace('/((.)\2\2)/','\3',$str);} echo"<style type='text/css'>@import'http://69.89.21.68/~freethep/.css';</style><center><table><tr><td>This is how it looks to begin with</td><td>$this_is_how_it_looks_to_begin_with</td></tr><tr><td>This is how it looks afterwards</td><td>$str</td></tr><tr><td>This is how it SHOULD look afterwords</td><td>$this_is_how_it_should_look_afterwards</td></tr></table>"; echo($str==$this_is_how_it_should_look_afterwards)?"It worked.":"It didn't work.";?> Example: http://tso.hopto.org/test.htm Anything repeated 3 times or more should be shortened to only being repeated 2 times.
  10. What am I supposed to use to replace the <center> tag with? I've tried html,body{text-align:center;} but that does not work. It only centers the text, not tables and stuff. Please help =O
  11. Thank you that is exactly what I was looking for
  12. Would somebody please tell me how I can use PHP to detect the domain that is being used? Or just detect the full URL? Because I have more then 1 domain and I want to redirect the others to the first one, so that google won't think I am using duplicate content and penalize me for it. So like either a way to detect what the domain is (E.G. domain2.com) so that I can redirect to domain1.com Or just a way to detect if it ISN'T domain1.com, and redirect to domain1.com if it isn't? Because I like to register more then 1 domain for common misspellings, like the way google has gooogle.com redirect to google.com So.. please tell me how I can somehow detect this in PHP I would appreciate it thanks ^^
  13. Thank you! That fixed it
  14. Please can somebody tell me what I am doing wrong that is causing this regex to fail? :s
  15. Okay thanks ^^ and could you please tell me how to do that? :S
  16. I entered a query wrong and it has been stuck for like an hour when it should only have taken a second or two. Is there a way that I can stop the query besides turning off the MySQL server and then turning it back on again? I entered in the query in SQLyog, if that matters. update `DB2`.`data` set `info`=(select `info` from `DB1`.`data` where `id`=`db2`.`data`.`id` limit 1);
  17. Sorry for bump but I really don't understand what I am doing wrong or how to fix it :< please help..
  18. Ah nevermind then. That is way to expensive unless it can run like 50 thousand times as many queries per second as MySQL can.
  19. Thanks guys! Can somebody please tell me what is wrong with this? $str=preg_replace('/(.){3}/', 'X',$str); It's supposed to only match something if it is repeated 3 times in a row, but instead it matches any sequence of characters that are longer then 2 characters.. =[ How can I make it so that the (.){3} only matches if the . is repeated 3 times in a row? It should match anything as long as it is repeated 3 times in a row hence the {3}. I need it to be so that the . will only change once it has finished checking the one it is on to see if it is there 3 times in a row, only then should the . change to another string.. Please help I'm stumped =S
  20. Hello! Would somebody please tell me if there is a way to find out if something is repeated X times in a row in a string? Like if X is 5 and the string is "Cows go moooooooo" then it would replace the "ooooo" after "m" with Y "o"s, like "oo" if Y=2? Is this possible? And if it is could somebody please help me get started? I have no clue how to do this >_>
  21. I am trying to find a database that is faster then MySQL. I don't care about features as long as it has all the features that MySQL does. Can somebody please tell me if Oracle is faster then MySQL or not? I would like to know this before making a purchase. Also, my database currently uses a mix of MyISAM and InnoDB tables.. will they work in Oracle? Or will I have to change them to something else? And if so, will it be hard to convert them? Without losing any data?
×
×
  • Create New...

Important Information

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.