Jump to content

Don E

Members
  • Posts

    996
  • Joined

  • Last visited

Everything posted by Don E

  1. Usually most host services allow you to manage that particular domain with them at a free cost if you decide to leave that host for the hosting of your site. They also usually give you the option to transfer it to the new host if you want. Personally I would transfer it to the new host so that you can manage and do everything in one place.
  2. Don E

    cout in c++

    You can do something like for example: cout << "green " << "land" << endl; or cout << "green" << " " << "land" << endl;
  3. Is this a shared host or ? You probably want to completely delete those files or move them to a different directory on the server; basically anywhere other than your web root or to a directory that is not accessible to the world. If you cannot/dont not want to delete them in the mean time for whatever reasons and have to keep them in the web root, add(rename) .bak to the end of the file names. If they are .php files, this won't allow the dodgy php file to run when the hacker goes to open the files via a web browser etc. Basically the hacker will get a 404 error; file not found. Even if he somehow knows you added .bak to the file, since it has .bak as its "extension" and no .php, the php code won't run. If you're certain something is going on, I would close ALL ports to all IP address except your home IP address. Hopefully its a static one from your ISP. This is in the mean time until you can figure out what's going on so no further can happen. I'd also look at your cron jobs because it's possible those scripts are set to run at certain times of the day etc and send out info to the hacker about whats going on on your server. Depending on what you're using for managing your server, you should have an area that lists cron jobs. As justsomeguy mentioned, check your logs. You should have a FTP log for example and I also believe a cron job log. (This is assuming if your server is setup with some kind of server management software and if everything was set up correctly for you to have the appropriate log files). Also make sure your ssh is NOT accessible PERIOD(if anything, only to you). If you must in the mean time until you figure out what is going on, completely close the port for that or shut down that service. If you close all ports for all IP address other than yours until you figure out what's going on, then you should be ok. Ssh should only be accessible to the appropriate users and recommend to use public key authentication instead of user/pass when logging in and using a different port number other than the default port number for ssh. Get yourself a better firewall; the kind that detects port scanning for example and blocks that IP. Anyhow, hopefully some of this was helpful. I don't know if you're on shared host or not, but if you are, you may not be able to do some of the stuff I wrote above because some hosts do things a certain way. For example, chances are you won't be able to get another firewall or close ports or close services etc. Your host said they been there for years, maybe they have and you just noticed them and they're harmless? Can you verify they been there for years by checking the dates the files were created? Are you able to see what the files contain? (If host doesn't have a 'edit file' feature, download the files to your home computer and open it via a editor. Should be okay as long as the file is not executed on a web server) If you can see the PHP code the files contain, you can see exactly what the scripts are doing.
  4. Quick question, is PDO also considered more secure than mysqli besides it's ability to work with more databases? Thanks.
  5. You can by checking inside the printGroceries function if the length of groceryItems.length is greater than 0. If so, execute the for loop, if not (else), print "Your list is empty". For example: function printGroceries(groceryItems){ //var groceryitems = i; var msg = ''; msg += '<ol>'; if(groceryItems.length > 0) { for(var i = 0; i < groceryItems.length; i++) { msg += '<li>' + groceryItems[i] + '</li>'; } document.getElementById("grolist").innerHTML = 'Here's your grocery list:</p>' + msg + '</li>'; } else { document.getElementById("grolist").innerHTML = "Your list is empty"; }}
  6. In the getGrociers function, the items array is not being populated. You can use the push method items.push(); for that. Something like: do { var answer = prompt("Enter an item to add to the grocery list (enter ‘q’ to quit):"); if(answer != 'q' && answer != 'Q') // so that q or Q is not added to the list { items.push(answer); }} while (answer != 'q' && answer != 'Q')
  7. What Foxy wrote goes the same for me as well. It looks very resourseful but never really participated. If that's the case that's unfortunate. I'd go elsewhere.
  8. Normally when you want to assign a function to an element for an event and to have that function ready to be executed whenever the user does something with that element(i.e., onclick etc), you do it the way davej showed without parentheses.
  9. Check out this: http://fiddle.tinymce.com/e5caab/40 You should be able to have many editors on a page and able to get their content using tinyMCE.get('textarea selector here').getContent(); like it's shown in the Fiddle I edited. Click the Get content button that is below the 2 tinyMCE textareas. It should display via alert the content for each tinyMCE textarea. Also to note, in the fiddle, the inits are using editor_selector: instead of just selector: With editor_selector, it appears you can select via class name. In order to select via id, it appears you have to use selector: as shown in this fiddle I edited: http://fiddle.tinymce.com/e5caab/41
  10. Hello, Try this, it works for me: var content = tinyMCE.activeEditor.getContent({format : 'html'}); Also, make sure you have tinymce.init set/initiated for the textarea, should come before the above in the javascript code. Something like: tinymce.init({selector: "#myTextArea",theme: "modern",plugins: [ "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template paste textcolor" ],toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons" });
  11. Don E

    Google -- "Facts"

    Yes I agree something should be implemented to return the best accurate(factual) results about a particular subject when searching but imo when a user enters something specific like "moon landing hoax", since they are searching precisely for that for whatever reason, information regarding that should be returned. Now if they enter "moon landing" and say for example the more popular sites/results are of sites discussing a "hoax" about it, in this case since they entered precisely "moon landing", results for that should be return(factual information) and should come first despite the other more popular sites that normally come first. IMO, search engines should return as best as they can precisely what the user is searching for depending on what they entered. This to me is the point of search engines as it has been since the internet began really. Please understand, yes I agree factual information should be returned but should depend precisely what the user enters(like in the example I gave above). Perhaps google should implement an option upon searching that allows you to search for factual information to be returned. This would be ideal I guess to be fair to the owners of the websites that offer alternative views and opinions on subjects. If we want to talk about facts being return, then w3schools.com is 'SOL' because there are many out there that believe w3schools is not a reliable 'factual' information website in regards to web design/development.
  12. Don E

    html forms

    Yes of course once a user is logged in but going on the example you posted, the form indicates to the site this is a new user. Of course you don't have to have the hidden field to indicate this is a new user because once the user submits the form, you can check to see if that user exists or not depending on the information they provided. An example was this: "Like in the example you posted, you see the name is userStatus and the value is New. Once the user submits this to the processing page, it lets the processing page know that this is a New user and to execute the necessary functions etc to add the new user." Another could be for example:The user is signing up for a site and you have a hidden input field indicate default language based on geographical location until the user indicates otherwise. ​Another example could be: ​Once a user is logged into their blog for example and they decide to edit a specific post, you can have a hidden input field to indicate to the processing page what post they are editing so that the appropriate record in the database table for posts is updated. ​Just to note as I'm sure you may be aware, hidden input fields don't offer security and should be used mainly for temporary or/and non-sensitive information of data that needs to be passed from page to page.
  13. Don E

    Google -- "Facts"

    Well, imo, just another way to "control/police" the internet by giving people the idea that if it's a fact and google says so, it's true and that's all there is to it. People should be allowed to explore and research and come up with their own conclusions based on their own research, not what some giant search engine says as fact. "If it's on TV, it must be true." Same idea.
  14. Don E

    html forms

    Many reasons. For example, lets say you want to pass the status of a login user wether to tell if they are signed in or not, or what page they are on, or their status etc as they are filling out the form for whatever reason. Another reason could be to indicate something specific in the page that processes the form to do, like... say on the process form you have many functions that deal with processing forms etc and for a particular form you have in the hidden input field that indicates what you want to do once the form is submitted to the processing page/file. Like in the example you posted, you see the name is userStatus and the value is New. Once the user submits this to the processing page, it lets the processing page know that this is a New user and to execute the necessary functions etc to add the new user.
  15. Maybe because it's counting the the 8 arrays inside the board array. 64 + 8 = 72
  16. You mean something like this? <!doctype html><html><head><meta charset="UTF-8"><title>phone</title><script type="text/javascript">function validateForm() { var x = document.forms["myForm"]["phone"].value; if(isNaN(x)) { alert("Input your phone number"); return false; }}</script></head><body> <form name="myForm" action="demo_form.asp" onsubmit="return validateForm()" method="post"> Phone number:<input type="text" name="phone"> <input type="submit" value="Submit"> </form></body></html>
  17. Try removing "new" from the printMe function inside function Person and adding () to family.printMe(); Also in the console.log output, instead of Person.name and Person.age, have instead this.name and this.age. Oh, also for the sake of good practice, don't forget the keyword 'var' in the for loop declaration.
  18. Hello, Are you looking to search for when a user enters something like for instance: "Henry Ford" or "w3schools tutorials PHP"? If so, in addition to what Foxy Mod advised, you can use MATCH() AGAINST(). See these links for further info: http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html http://stackoverflow.com/questions/792875/which-sql-query-is-better-match-against-or-like
  19. I see, but many sites like Facebook for example adjust the time for their users to the users' local time without asking them for their timezone etc.
  20. Fox, What would be the best route to take if you try to adjust the time to the users local time without asking them for their timezone etc? I understand using the browser via Javascript is not a good idea because their clock on the computer can be wrong but getting their timezone at least via Javascript can be an option to take because from there you can calculate what the correct time is for them using the timezone supplied from Javascript and the server time? Apologies if this is hijacking the thread. If so, this post can be deleted.
  21. Using document.write() creates a new document. One way to do it is give the TES div a id and then in the disp() function using document.getElementById to access the div and then change it's className to x. There are various ways to accomplish what you're doing. Whatever works best for you to understand. Here's a way: <!doctype html><html><head><meta charset="UTF-8"><title>TES</title><script type="text/javascript"> var x; window.onload = function () { if(screen.width < 1281) { x = 'r'; } else { x = 'b'; } disp();}function disp() { document.getElementById('TES').className = x;}</script><style type="text/css"> .r {color: red;} .b {color : blue;}</style></head><body> <div id="TES">TES</div></body></html>
  22. Here is a good list I check out for used ports: http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
×
×
  • Create New...