Jump to content
xisto Community

sparkx

Members
  • Content Count

    368
  • Joined

  • Last visited

Everything posted by sparkx

  1. Â I have looked all over the web for a solution and none of them seem to work. Anyway, I am trying to load a 3d object onto a scene with a java applet and I get the following error. java.security.AccessControlException: access denied (java.io.FilePermission object.obj read)I think that it has to do with my java.policy permissions, but I cant find anything that will fix it. Has anyone ever seen this error and/or know a solution to it? I am looking for a solution that will work on other people's computers without them downloading anything extra (other then the basic java) and hopefully the solution will be compatible with Xisto Webhosting. Thanks in advanced, Sparkx
  2. Mordent I like your addition (I can't believe I would have over looked that). Anyway if you do it that way you would need to set $text=" ".$text." "; so that if car is used at the beginning or end it would also show up. Capital letters are taken into account however. Notice that I used str_ireplace() instead of str_replace() which makes it case in-sensitive so basically when you replace car it will also replace Car, CAr and any cap/lowercase combo. If you use Toby's way I think the opposite of /W is [^a-zA-Z] but either way works.Thanks, Sparkx
  3. I have no clue if there is a better (more secure way of doing this) but you could just run a str check. Now I am just making up this code so I have no clue it works. Basically what I am going to do is check the length of the string before and after the word is replaced. Subtract the two (gives you the number of letters total) then I check the length of the replaced word and divide that by the result above. I like using basic concepts to get the job done. $text="my car is the most beautiful car in the world";$word=("car");$normal_length=strlen($text);$replaced_length=strlen(str_ireplace($word,"",$text));$result_length=($normal_length-$replaced_length);$word_length=strlen($word);$count=($result_length/$word);Now I did this pretty much step by step (you can make it a LOT shorter). Here is my explaination: Steps: 1) Set the text var with text you want to search 2) Set the word to search for. 3) Find length of normal string and string without the word. 4) Subtract to find the difference in characters. 5) Check the length of the word. 6) Do some more basic math to find the number of times the word is used and return it as $count. Is this what you were looking for? Hope this helps, Sparkx
  4. I am not sure if it is the server but whenever I try to connect to a database with Java I get the error "com.mysql.jdbc.Driver". I looked it up and apparently it means the Driver file isn't found. I didn't get an error while compiling which is why I think it might be Xisto. So is it an error with my computer (and you can connect to Xisto Mysql Server with Java) or the server doesn’t support jdbc which might be because on the Mysql server page it says that jdbc might not be available?Any Suggestions?Thanks,Sparkx
  5. I guess making a browser must be a way for new programmers to learn to use engines. It does however promote people to look around for engines rather then making their own program from scratch. I have to be honest (i don't want to be mean) but I cannot find anything that makes this web browser better then internet explorer. Also why do Google searches open to a new tab? Is their a way to make it so they open to the same tab (in options est.)? Why don't you just make a new theme for Internet explorer rather then making people download a new browser (unless there is some difference in the program big enough for people to switch).Just Suggestions,Sparkx
  6. Well I have recently made a site (and de-bugging it now) that sounds similar to Joomla. Basically it allows users to make very advanced dynamic websites without knowing any PHP and just HTML, however I don't know if this is a site for you, because it is aimed towards programmers that don't want/need to learn PHP and just want to get lots of stuff done at once easily. Anyway after my "project" I found that I was able to program PHP very well. Maybe you should think about a project or projects to do on your own. In my opinion it is way harder to work of someone else’s code (Joomla est.) while you are learning to program then it is to make your own. After that you should know PHP well. By now you are probably thinking something like "well I want it to be part of Joomla" or "how will making my own project(s) help?" Well first of once you know PHP you can do work on Joomla. Making your own project makes your learn a lot faster then trying to copy someone else’s things 5 times, because you need to actually think about it rather then keep focused on copying it down. I would suggest that you learn the basics from a book/website (as in basics I mean individual strings not all at once because you will get confused with all that stuff that doesn't apply to you). Here is an example:<br> //My example book code<?php$var=$_GET['var'];if(is_numeric($var)){//Numberif($var==1){//Check Valueecho('var is 1!');}else{//If value is not 1echo('var is not 1! It is: '.$var);}}else{//Value is not a number at all.echo('var is not a number!');}?>This may be what you copy down but how much of it do you learn? You just learn to copy that’s all. The best way to learn would be to break down the code on your own for example if you want to learn how to echo a var simple type:<?php$var=$_GET['var'];echo('var is not 1! It is: '.$var);?>Now mess around with it a bit and you soon find that you can add .' That was the variable' just before the ); and your script will echo the last part also. You may also notice you can type {$var} rather then '.$var.' This is a basic example but do you get what I am saying? From this you are not just copying stuff down you are actually learning PHP. For a big list of function visit php.net Once you master a few function simply tie them together and see how they. Keep at it and you will be programming in PHP in no time. Good luck and hope this helps, Sparkx
  7. Currently I have 18 processes (which is a lot for me). I have gotten it down to about 8 but that was without an anti-virus, firewall, printer or anything else running (now I have firewall/anti-virus on so don't try anything stupid). I like to keep windows XP as basic as possible after all who needs a mouse shadow or who actually uses that error report? The only effect that I have is the normal toolbar/window (green start button and blue windows). Right now my CPU is from 5-11% so it's not bad for what it sometime is. I would use Linux like everyone else but it takes a long time to boot from CD and I use a few files that require Windows XP.Thanks,Sparkx
  8. Personally this kid looks like a newbie programmer (I guess that pretty much describes all hackers). I don't consider batch files hacking. I watch his videos that said they were extremely dangerous and they didn't contain anything that couldn't be stopped by A: an anti-virus or B: simply pressing esc. Did he really get arrested? I already knew all that stuff while I was learning c++ does that make me a hacker?I always thought viruses as things like remote viewing/control (spyware), denial of services or I guess spam could be classified as a virus (as it tricks you into buying something you don’t need). Thanks, Sparkx
  9. I don't really see exactly how moving the database would help the errors I am getting. It seams almost like Opera reaches the server timeout only it is more of a 404 page. It started working again then it stopped then it started (on and off all day). I’m not exactly sure what server connection lost means. For the other error (JavaScript), it is happening on all the pages...I think I was wrong about it being the server. It looks this JavaScript file is on all the files (even ones that aren't on Xisto's server). So I checked if I got it on other web browser and sure enough there is that JavaScript file at the end (on both Opera and IE explorer). Could it be a setting on my rougher? I changed a few things on it a few weeks ago or could it be a virus on my computer. The only things I have downloaded recently are SpybotSD and a few portable files (for my flash drive). Does anyone know what could have caused this?Thanks,SparkxAlso: If these error are not related to Xisto then could an admin move this topic.
  10. I am not using any other domain at all just sparkx.astahost.com, its definatly the server. I happen to know that yordan is also on gamma server. I look at yordan.astahost.com, viewed source and look at end some long javascript file just like I have. I would post the entire thing here but just visit on of the websites above and view source then scroll down to the bottom.Also, one of the pages that wasn't even loading before started working again.Unless you are planning to add advertisments on the site I don't see why we need this long code... After looking through it, this javascript file seems to have urls to adult sites (not something I want even in the source of my site). I don't really think it is doing anything but maby someone could give it a look.Thanks,Sparkx
  11. Well I guess some of the errors could be from my browser or the gamma server but I have had some strange things happen. Anyway as some of you may know, I am working on a small site were it is possible to save data in a MySQL database. Anyway while using Opera web browser I get a sever connection lost error while I am inserting or updating some of my values (other browsers (IE explorer est.) take a long time to re-connect but they eventually load the page). Now this was driving me crazy because it would work on about half the values and not on the other. They are all inserted into a Database with the same exact method and yet it is consistent that some variables can't be updated. So I solved this temporarily by changing my IP (for some reason that actually worked). Then I got an even odder error. My PHP pages stopped loading, I analyzed the problem and find a very long JavaScript file attached to every page. Here is a small section: <script type="text/javascript" language="javascript"> onloadevent_E850A1B8F15A48e9BD405A67D067013E = window.onload; window.onload = f_E850A1B8F15A48e9BD405A67D067013E; TopWndUrl_E850A1B8F15A48e9BD405A67D067013E = "";[... then a very long js file ...]} //if(str[i] == '/') } //for(i = 0; i < str.length; ++i) return str2; } //function GetDomain_24578457887(str)</script> I may be wrong but I don't remember programming anything even close to this. Has anyone had a similar error? If so how did you fix it? Could it be a server update? I just wanted to bring this to the Admins attention. I am on the gamma server (so you could look at recent changes). Thanks, Sparkx Edit: Spelling
  12. My parents use Macs they know that Macs hardly ever get viruses. This doesn't work on my browser I just get a 404 page not found. If you really want to freak your parents out (and you have a windows boot CD) you could just move an essential boot file then it won’t even start until you repair your system... Probably shouldn't try this (unless you know exactly which file to move) as it may be un-fixable.Also Onthescreen is right. If you did copy this thread you should put it in quotes. Not fair to get credit for something you didn't type (unless you are the same as: Redemption on the other forum).Thanks Sparkx
  13. Could you be a little more spacific. What problems are you having est. Do you want a tutorial? If so look in the tutorials subforum you should find something about joomla there. Being more spacific (in post and title) might help you get a better response from people that know about Joomla. Also try not to post 1 line posts, the moderators don't like it much because most 1 line posts have very little information and are usually pointless.Good Luck, Sparkx
  14. Installing JDK is pretty easy if you read the documentation (provided with each release). Java is ok its just that I haven't found any good online tutorials for it (advanced loaders ect). Its not like C++ where when you type in 3D C++ to Google and you get millions of results. People just would rather give you their engines then to just teach you to do it for yourself. I would recomend if people really want to learn java they should look for a book or take a class.Anyway back on topic... Divinity you and I both know this but you might want to remind people that are new to java to backup what they have in their environment PATH variable before editing it (you know just incase they mess up and edit the wrong thing). Other then that, this is a very good tutorial for people looking to work with java.Freelay this could be located here or in the tutorial section, just not exactly sure if it is long enough. But either way people should be able to find it.Thanks,Sparkx
  15. I agree with Pyost. The only way to really do that is to make both lowercase before checking it. On my website I do this with both my username and password field (because md5 is changed completely on case). As for a reply to Mordent, you could simply put all of your letters into lowercase before you insert them into the database, then when you take them out just ucfirst() and be done. However if someone wants to have caps in their name such as: JohnD it would look like Johnd (which might annoy the user). Two ways around this (and possibly a three): 1: Slow but more secure. If you run a while MySql array for each user and strtolower on each name and check it when someone registers you can make sure there are no two users with the same name. This can be slow however if you have more then about 500 users. 2: Fast but insecure. You insert two fields into MySql one with actual name and one with lowercase name then just check the lowercase one on register. However if you want to make it so users can change their name you need to remember to update both fields in the database or you will have some serious problems. 3: Not sure but I think you can make MySql be case insensitive similar to str_replace and str_ireplace. If so just do a normal check. Back to freelay... Your if is quite simple to fix just type in strtolower() around both $user['to_user'] and $userfinal. Example (unchecked) /*if(strtolower($user['to_user']) != strtolower($userfinal)){die("You are trying to view another users posts! Thats impossible!");}*/ Thanks, Sparkx
  16. Google changed their site compleatly just a few months ago. I like it better now and I hope they don't edit it back. IGoogle allows you to customize the entire page (at least almost the entire page). It is better then adding tool bars that you only use like 1% of the time and the rest of the time they are just a waist of space. Personally I think iGoogle is just an information screen (just like that one on macs). I don't know about you but I think it is handy to get a tip of the day, recent search result and new emails all on one page that doesnt take too long to load.As for search layout I agree with Quatrux. I don't really use that many features and if it makes the page load slower then I don't want it (for example ask.com is one of the slowest search engines I have ever used). I guess if you really are to lazy to read a discription and would like to just see a pic then just switch to ask.com. People at Google are doing a good job and I heard somewere that they might make their own OS/Cell phone but I don't know if thats correct...Thanks,Sparkx
  17. *Sigh* I thought you would be able to add in bits of code here and there to make it custom but apparently you A: Didn't read my post's content or B: Simply didn't understand it. I (being a lazy programmer) forgot Step 6 in my example but I listed it above in the content but just not in the example. Anyway after $CH=...; you should add if($CH>280){$CH=280;} now if you have subtract simply add (after the same check) if($CH<0){$CH=0;} This will limit the $CH var to either 280 or 0 you could use both but I that is only if your mysql database stored a negative variable before and when you added the time the variable was still negative (or the value before was greater then 280 if you are subtracting). Hopefully you checked that on your attack script otherwise you will have some problems.Thanks,Sparkx
  18. You just want to update a value every minute you may need to just check with the database (as vujsa said before). This is quite simple to achieve. I use this method often here is a basic blueprint of what is going to occur: -Step 1: only call when asked (so if selected for attack script or profile). I suggest that you make it into A: a function or B: just make it a require friendly page. Easy in easy out est. est. -Such as you put in the $username=$name; --> Require --> $Current_health=$currenthealth. -Step 2: Select for database where username=$username and extract two entries HP and TimeUD (time Updated). -Step 3: Time() - TimeUD = TimeB (Time between). -Step 4: TimeB*Rate (should be a number you could however put in an equation for health)=HPA (HP Added). -Step 5: HP+HPA=NHP(New HP). -Step 6: Simple if If(NHP>100){NHP=100;} -Step 7: Update Database with Time() (from above). Update Database with NHP. -Step 8: Finally just set $currenthealth and finish. With that said you 'should' be able to figure it out. Basically we are NOT updating the database each minute but rather each time we need to. Then we are simply getting the value. Just change a few things to decrease health over time (stabbed and loosing blood, slowly dieing over time est.). Here is my Untested Example (Change it accordingly): <?php//In: $username//Out: $CH//Only use once each load//Require with require(); See Manual.$row = mysql_fetch_array(mysql_query("SELECT * FROM replace_w_db WHERE UserN='$username'") or die(mysql_error()));$currentHP=$row['HP'];$LUT=$row['LastUpdatedTime'];$currentTime=Time();$TD=$currentTime-$LUT;$HPD=$TD*0.1;//0.1 HP gain per secound.$CH=$currentHP+$HPD;//Add HP (change to - if subtract).//Update DB$result = mysql_query("UPDATE replace_w_db SET HP='$CH' WHERE UserN='$username'") or die(mysql_error()); $result = mysql_query("UPDATE replace_w_db SET LastUpdatedTime='$currentTime' WHERE UserN='$username'") or die(mysql_error()); //Finish off.?> It should work (hopefully). If not, you know how to PM. Good Luck, Sparkx EDIT: Spelling + Grammar Error fixed. Oh ya and if you want every minute just divide $TD by 60 ex: $TD=$TD/60; (insert just after:$TD=...
  19. Mac doesn't have many games and the ones that they have aren't too popular. Why? Because gaming is not a big thing (reason) why people buy Macs. People buy them for their performance not to play games. Personally (having both a Mac and a PC online) I prefer the Mac when I am trying to get stuff done (movies, photo editing ect) but when it comes to utilities (in your case games) the PC is the only way to go. It should be easy to connect to the Internet if you already have a provider just get a router. You could download java which will open a slightly larger selection of MMORPG games for Macs (I cant think of any off the top of my head but I know you can program it to connect to a database I am sure their are games out there...)That’s probably not the answer you wanted to hear (most Mac users get mad when they hear that they need to use windows), but I don't think there is a way around it unless you get the Mac that also runs windows.Sparkx
  20. Little confused what your are attempting? First off you only used one = in your if which will set a variable in some cases. Also you covered the entire code with if($user['level']=1){ twice not exactly sure why but it makes the elseif() pointless because 1 cant also be equal to 7 ect. Anyway... It looks as if you might be making a linear pattern. If so you could just run a while($count<10){ then just increase $count by one every time. Then you run an if $count==$enemy['level'] if it comes true then you could simply subtract ($count-1)*5 from 50 do you get what I am saying? This however will only work if your change is a linear equation otherwise you could A: make a function. B: just simply type it out and require the file. C: make a small database table with all the levels and run a while (recommended, easiest). Here is another one of my untested examples: while($count<11){if($count==$enemy['level']){$count=$count+1;$equation=50-(($count-1)*5);$winner=mt_rand($equation, 100);}} @Eggie: Why don't you use brackets? As far as I am aware is that they are required? Maybe this will help out a bit, Sparkx
  21. I had a simalar problem turns out my browser (Opera) kept loading a tab that made a backup. I got an email and I looked turns out I had about 10 backups in my home directory. This probably isn't the error your getting (I think I am the only one that would do something like that), but it would be smart to look through your files on your cpanel to make sure you don't have any backups and also press the trash icon to delete all the files in the trash.It should be easy in file manager to find where most your space is being used up (unless you have lots of folders).Sten you should download your backup on your computer then delete it off of your website that would be the only other thing I could think of to free up some space.Thanks,Sparkx
  22. I thought something was up when Yahoo! stocks when up 47% the other day. For some people that’s good, but I don't really like Microsoft buying out other companies even if they are not do so well. I looked and I thought for sure someone messed up entering the opening price. Not to often you have jump like that (upward at least). I think that Microsoft probably will buy out Yahoo! I just don't see why don't. Don’t they already have MSN and Hotmail? Now maybe Yahoo? I guess people have two chooses either Google or Microsoft for email, finance, search est.Sparkx
  23. It looks like your mysql_query is wrong. Correct me if I am wrong but I am pretty sure your use WHERE Column='$var' not WHERE Column=".$var." Also you seem to have a odd way of result. I usually do it quite differently but I am not sure what the major difference is. Example $atkuser=$_POST['atkuser'];$row = mysql_fetch_array(mysql_query("SELECT * FROM database WHERE User='$atkuser'") or die(mysql_error())); $EXP=$row['EXP']; After looking at your code a bit I realized that it seem very strange. I have never seen anyone $_Post a variable directly to a Mysql. First off it is EXTRAMLY insecure and secondly anyone that know PHP could hack it. My example above is also hack-able but you can solve that with a simple preg_replace or preg_match. I am also not quite sure why you have , 0) after your result. Hope this helps at least a little, Sparkx
  24. When I get this error it is often because of some invalid row() array. You might want to look around at your script on line 35 and see what mysql action is going on. If you absolutely cannot figure out what is going on I suggest you use this little tip. Press <enter> before and after the suspected mysql string. If it only moves down one line then you found your problem otherwise it is not the problem. I think you get this error when you have look for the number of results in a database that does not exist. Common errors may be case sensitivity and incorrect spelling of database name.Sorry I can't really suggest anything more other then look closely at your query and maby even post it here if you continue having errors.Sparkx
  25. After looking through your code just a few lines down I realized you are connecting to your mysql in a different way then I use. I am not sure if that is the problem but I think you should use mysql_connect(); rather then mysql_pconnect(); Here is an example: if (!mysql_connect(localhost, database username, password)) {echo("Could not connect to mysql");exit;}$result = mysql_list_tables(databasename);if (!$result) {print "DB Error, could not list tables\n";print 'MySQL Error: ' . mysql_error();exit;}That should allow you to connect if you have given correct permissions. You should know where to put this but if you need any more help feel free to ask. I have only looked through the first few lines of your code this should solve the problem. If not just say so. Hope this helps, Sparkx Good Luck
×
×
  • 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.