Jump to content

amalosoul

Members
  • Posts

    95
  • Joined

  • Last visited

    Never

Everything posted by amalosoul

  1. I have moved its content! This page is not available any more...
  2. Well, the first round(sqrt($n))-1 numbers are not random (the numbers are simply in ascending order) but the rest of them are random (you can modify it to use only the round(sqrt($n)) to $n numbers). But I gave what you needed most! Don't use large numbers for $n, it will significantly slow your program!
  3. Include this file I have written for you! <?php //$n is your square number (9 if i am not mistaken), use only square numbers! $n=9; for ($i=0; $i<round(sqrt($n)); $i++) {$arra[$i][0]=$i; $arra[$i][1]=1;} for ($i=round(sqrt($n)); $i<$n; $i++) { $newnr=rand()%round(sqrt($n));   if  ($arra[$newnr][1]<round(sqrt($n))) {$arra[$i][0]=$newnr; $arra[$newnr][1]++;}   else   {while (!$aux)     {$aux=0;       $newnr=rand()%round(sqrt($n));       if ($arra[$newnr][1]<round(sqrt($n))) {$arra[$i][0]=$newnr; $arra[$newnr][1]++; $aux=1;}     }     } } for ($i=0; $i<$n; $i++) echo $arra[$i][0]; ?>
  4. I have a string which contains \ symbol and I need to eliminate it, but every time I use $string=str_replace("\","",$string); php expects \\ and it issues an error! How can I solve this problem? Thank you very much!
  5. Thank you for your pacience! I appreciate your suggestions!
  6. Sorry, my mistake I didn't notice that the replies came from the same person:). So I thank the only one of you  ;D!
  7. I have created a MMOG and because of the increased number of variables I need someone to tell me what still needs to be done... http://valentin.phpnet.us Thank you very much!
  8. Thank you for the link! It was really useful!
  9. No I don't have kudos...but the other reply solved my problem. So I thank you both:)!
  10. Ok. I thought it could be done with php. I was thinking of frames by my host adds a lot of advertisments:). Thank you!
  11. I want to play music on my internet page, but I want it to continue to play in case the user swiches to another of my internet pages. How can I do this? Every time I go to another url the music stops. Thank you..
  12. I have one domain for example www.mydomain.host.com. When someone opens in his/her browser this link it displays the content of htdocs (I am using Apache in order to run PHP). How can I prevent the browser from showing the content of the folder and instead to redirect towards a php page?
  13. Can I find out specific information about an user who opens a php page (like ip address). I need to create a program which doesn't allow multiple registrations from the same computer. I know that $_SERVER stores this kind of information, but I don't know which argument to use.
×
×
  • 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.