Jump to content
xisto Community

galexcd

Members
  • Content Count

    1,313
  • Joined

  • Last visited

Everything posted by galexcd

  1. An easy solution:If you can find sombody who posts on Xisto but want to switch to atahost, you could "trade" your credits eh?
  2. i play diablo and starcraft occasionally (on usWest)you can message me in game if you want. my name is alex7h3pr0gr4m3r. add me to your f list!
  3. I'm a mac user but i still think linux is the best!
  4. yeah I kinda typed them up on the spot so I didn't get to test them, but I'm glad it worked!
  5. Why do you want to use java? Java is teh cr@pz0r. I hate it!! Use flash, or use javascript w/ ajax. I have both scripts if you want them.
  6. I'm guessing because the whole thing is in quotes he didn't write it himself?
  7. I've always thought of this particular invention, although impossible to make, but the bottomless drink topic inspired me to post this. What if I created a solid made up of pure energy, and have the energy somehow cancel out all of the friction, and make it work the other way: Anti-Friction. If you were to put an object on this solid and push it, it would start traveling faster and faster until it reached the end of the solid, or it collided with something. Imagine the uses! Power plants just have a humongous wheel constantly spinning on this "anti-friction" generating electricity. Then again, if humans can figure out how to create the everlasting energy required for creating this invention, you really wouldn't even need that.Anyway what are your thoughts?
  8. What about that insulation that when it is sprayed on walls it expands about 100 times its size. Heh the people who put it on have to wear masks so that a tiny piece of this material doesn't get inhaled in their lungs and basically make them explode
  9. I've been thinking about cloning, since the new "creature" would have the exact same brain impulses so the clone wouldn't even know it's a clone. The clone would think it's you. Everything would be the same. So one way of thinking about it is it's a 50% chance, either you die or live, even though YOU are the one who dies, another "being" is essentially YOU. It's kind of strange to think about especially if you believe in a "soul". How would cloning work then? Would a piece of your soul be put into your clone? Hmm I donno.. I'll ask God....
  10. I'm not too sure but what i want to find out is how george lucas thinks it is even remotely possible to make light sabers!?! #1, the light seems to have substance, if it hits another beam of light, it stops, instead of going through and since when does a light stop 5 feet away from its source?
  11. alright. I gotcha this script should work. No nested while loops required Try this: <?php$table1=mysql_query("blah blah blah");$table2=mysql_query("blah blah blah");$j=0;for($i=0;$i<$mysql_numrows($table1);$i+=($j-1)){$j++;$result="table".$j;$j%=2;if($j==1 || mysql_numrows($table2)>$i) echo mysql_result($$result,$i,"column");}?> The above example wont work if there are more rows in table 2 as in table 1 I thought that is ok because its question and answer. Heh, i kinda felt like coding fancy using modulus(%) and pointers($$result) etc... If you want a more simple code you can use this: $table1=mysql_query("blah blah blah");$table2=mysql_query("blah blah blah");for($i=0;$i<mysql_numrows($table1)||$i<msql_numrows($table2);$i++){if($i<mysql_numrows($table1)) echo mysql_result($table1,$i,"column");if($i<mysql_numrows($table2)) echo mysql_result($table2,$i,"column");}
  12. NEVER!It's Microsoft's pathetic attempt to copy OS 10.
  13. I think an easier way of getting multiple rows from SQL is with for loops. I don't really get what you exactly want but try this format: mysql_connect//blah blah blah conect to db 1$rows1=mysql_query("blah blah blah query here");mysql_connect//blah blah blah conect to db 2$rows2=mysql_query("blah blah blah query here");mysql_close();for($i=0;$i<mysql_numrows($rows1);$i++){echo mysql_result($rows1,$i,"column name");}for($i=0;$i<mysql_numrows($rows2);$i++){echo mysql_result($rows2,$i,"column name");} Is that what you meant?
  14. Should still work the same way '===' means exact equivalence instead of just equivalence. Example: if(false==0)//returns true if(false===0)//returns false
  15. I need an animated gif image flipped using GD library in PHP. I wrote a script to flip still images, but it doesn't work on animated images. This is probably because I have the script moving 1 column of pixels at a time, and switching them around. How would I make multiple frames?Any help would be great!Thanks!
  16. Thanks so much for your help Daniel15 and OpaQue! I'll be sure to move my pword files elsewhere now. I was including a php file called database.php in my home directory for the username/pass. But would an admin mind warning us next time the php is updated? I'd still prefer to keep my php code to myself.Thanks!
  17. my server is theta, but corzel didn't get the same problem. There were no errors in my page because none of the php worked. When u visited the site, since browsers cant read php code, it asked if I wanted to save it, and when I did, it had all of the php code in the file I saved.
  18. You mean my domain?Its not doing it anymore though... just for a few hours
  19. nono, u guys dont understand, I have the php tags i use <?php ?>, and its been working fine for 6 months. Everything works just for about 3 or 4 hours today, instead of parsing the php it sent the raw code.Did anybody else have the same problem?
  20. hey, if you can, i need a script that flips an animated gif image horizontally using GD library. Thanks
  21. I couldn't believe my eyes today, I log on to my web-page at school and NONE OF THE PHP HAS BEEN PARSED OUT!!! I saw the raw php code. This is a major security issue since many passwords for SQL etc... are stored directly in PHP, and it allowed people to see and possibly even steal my php code! Why did this happen? How did this happen? Will it ever happen again? I need to know whether or not I need to switch hosting companies. I have never seen this before.
  22. Heh i started off the same way, not knowing any php, but making Realm of forts has really helped me learn it, and unlike you I had to figure out my own log in script. My first log in script was quite exploitable, I created my own string encryption function (it replaced letters around a became u and e became 7 etc...) and for the longest time, when you logged in it would make a cookie with your user id and "encrypted" password, heh, well that was only when there were 2 other admins with me, so nobody's password was exploited, but then i learned what a session id was, and i changed it around to be much more secure.If your anything like me you won't like to take other people's code not knowing how "messy" it is, or if there are any unnecessary parts, even though it doesn't matter, I still like writing everything myself, so anyway, If you are like that, and want to write the script yourself Ill give you a quick tutorial:------------------------First of all you'll want an SQL table where you can hold all of your accounts, and their info, so have some basic stuff like username, password (ill go over how to encrypt the password later), and any info the game needs to function.Next you'll want to make a second table for session Id's, you'll want at least 2 columns here, but with 3 it will make your site less exploitable:Php session idPerson's IDPersons' IP address (optional)Now the fun part, for the log-in script, check the username and password that were given to the log-in page, and if they match one of the rows in the users (or players) table, have it make a new row in the phpsessionid table. Have the php session id be a random string of letters numbers or even symbols if you want, set the person's id, and if you want to protect your site against cookie stealers, the person's IP address. And set a cookie on the persons computer with the php session id (the random string of numbers and letters).Now on every page that somebody needs to be logged in to see, have php grab the cookie, find the php session id with that string, check their IP against the IP row(if you have one), and display all the info for the player's Id in the php session id. You also may want to add a script that executes every hour or so, and deletes phpsession id's that aren't in use, for this you'll need to add a time row to the php session id of the last time the person loaded a page.For the log off page, either have php delete the person's cookie, or delete the php session id row that the person is using, or you could do both.Now for registration:All you have to do is have the register page add a row to the players table, with the username they selected, and have the ID be one higher than the previous one(this can be done in sql so you don't have to bother coding this in php), and for the password, you may or may not want to use a hash. Depends on how honest you want to be. Since you are most likely the only person who has access to your SQL accounts, you can leave the passwords un-encrypted, so you can read them, I guess if that makes you feel special or something, but If you want to be honest, and encrypt the passwords from yourself, others who have SQL access, and even hackers who may try SQL injection to get the passwords, using a hash is very easy in php. The basic hash encryption function in php is "MD5", this takes in a string and encrypts it. Pretty easy huh?Example:echo md5("test")this will echo an encrypted hash of the string "test". Yes hashes can be broken with apps, but I prefer to use it. There are more complicated ways of making it more secure, but this is a great start.I hope you enjoyed my tutorial, if you have any questions feel free to PM me.----------------By the way, my game isn't done yet, but when it is its going to change all of those stupid text/MUD games, it's 99% js, flash, java, and graphics so watch out!
  23. I think he has the connection in /system.class.php, which is required in the beginning of the code. As far as I can tell, it looks like thats where the problem is, you mind showing us the code of system.class.php?
  24. Ive been wanting the optimus ever since I saw it. That is the best damn keyboard ever! It would make launching apps so easy... and i cant wait to find out how to program for it so my own games/apps can use it! [drool]
  25. Er.. Don't yell at me if I'm wrong, but I dont think whois lookups use Php to find out the info... I always thought that was some more of a server based script or something...or maybe the different hosting companies send them the info?I dont know.Anybody know how alexa.com finds out traffic ratings?
×
×
  • 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.