Jump to content

Don E

Members
  • Posts

    996
  • Joined

  • Last visited

Everything posted by Don E

  1. Hey everyone, It seems nowadays there's a phone app for everything. People seem to gravitate toward apps more than anything else really when it comes tasks. Websites seem secondary today because of the convenience of apps readily available for phones. It seems it's more convenient to go to an app instead of opening up your phones' web browser and typing in a website address for something. What does this mean for the future of websites? Of course websites will always be, but with the popularity of apps, makes one wonder if websites in the distant future can be.. obsolete? I doubt it, but if you look around, major websites all mostly have not just a mobile version of their site.. but an app as well. The other question is, is it even worthy of learning(continuing) web development when maybe one should aim for the app development world? Just thought I'd post and see what others opinions are. Thanks.
  2. You pretty much answered my question when you mentioned Zend. However for other un-free languages, don't they provide support or help in a way where you can communicate with a developer directly or something that will guide you through implementing secure code for your site? I don't know why I thought that for some reason.
  3. Interesting... You'd think they would hire the best of the best money can buy producing a near... keyword near perfect (because nothing is 100%) unhackable site. Question about PHP real quick JSG, do you think PHP will ever become a server side language like ASP etc in regards to having/getting support? if I understand correctly, doesn't many of the other server side languages provide special support for things like security etc? I would think no since PHP is free but for the sake of 'upping' the reputation etc, would it be a good idea to go that route for PHP or do the developers like to be strictly free regardless and up to the coders/developers to write good secure code for their site? Edit: Apologies if I took this topic of topic.
  4. Don't mean to intervene... I basically just did a <script>alert('hello world');</script> on Facebook for experimenting and looked in the source to see what the output was, it came back just as <script>alert('hello world');</script> inside <p> tag. I wasn't aware by allowing HTML tags in a HTML document without being converted to specialchars or anything can appear just as is with no effect taking place? Yes I know its Facebook and they probably have a team of people that work on user submitted stuff alone but found that interesting.
  5. With server side scripting, you do not necessarily have to learn shell programming. Do you feel you have to do because it's called server side scripting and most servers today are of unix/linux platforms? Server side scripting is referred or called many things, like 'back end scripting, or 'back end developing/programming', etc. To me web designing means front end work, client-side related stuff; what the user sees basically(the HTML, CSS and even JavaScript), and web developing to me means the back end stuff; the behind the scenes stuff that happens/occurs mostly unbeknownst to the user. The only thing they know in this regard is, "I clicked submit after inserting all my information in the form fields and now I am at a new page or another page that displays more information about what I inserted." Etc. When logging into Facebook for example, a WHOLE a lot of behind the scenes (backend/server side) stuff is happening to fetch/get your data about you that is neatly put together in what you see as your Facebook page/account. (Just using Facebook as an example.) This is all possible because of server side scripting(like PHP, ASP, etc) basically and not really anything to do with shell programming. When you will sign up for a hosting company that will host/serve your website, you're most likely going to be on a shared-host environment. That means a lot of websites are on one server. The server related stuff in shared-hosting environments are done by the system administrators that work for that hosting company. You really have nothing to worry about for the most part having anything to do with the internal workings of the server. All you need to do is, put together a website, upload to the server so that the world can see it. The server securities, updates, kernel related stuff, etc etc, is done behind the scenes by the system administrators of that hosting company. All server resources in a shared-host environment are shared. You cannot even update something on the server that needs updating not until the server administrators finally get to it or think it's necessary to do so. That happened to me. I was on a shared environment and noticed some versions of programs on the shared server that were pretty old/out dated. I email them and asked please update to latest version. They said "we cannot update a single server program because one client is requesting. We also go based of when the server administrators see it's necessary for certain updates" blah blah blah. Another example, some PHP scripts require a lot of memory usage. At home on my local server, the PHP memory is set in the php.ini configuration at a value that is adequate enough for the scripts to execute. So I made mental note and said "do not forget to set PHP memory value to 'live' server as well." After doing all that etc, I noticed in the logs I was getting errors; segmentations faults. I did not know what was going on; I set the memory to enough, I am seeing no actual PHP errors in the logs, but in another log file, I am see this segmentation fault error. I emailed host and they said you're script(s) are using to much memory when executed and that's causing the error. I said "well how is that when I raised the PHP memory in the php.ini file?" They said "we see that but we only actually allow a certain max amount per user on the shared environment." That's understandable but I wish I knew that before signing up. The error was caused by shell scripts actually that were executed via the PHP script/file. The shell script(s) basically dealt with image manipulations that called/interacted with a image manipulation program on the server which was actually outdated! So if you intend to go on a shared hosting environment soon, all server related stuff is mostly out of your reach for the most part. If you want complete control over the server yourself, you should then aim for dedicated hosting but that is way more expensive than shared AND.. a pain in the ______ in maintaing yourself. Trust me.
  6. I never got the opportunity to post in the thread you made about 'what was your first programming language' but yes mine was C++. Back in the mid 90s I got my first computer and was fascinated with it. I wanted to know everything about it. The insides and outs. Then upper 90's I was fortunate to meet on AOL (America Online; basically was a place(it was an actual program back then) people log on to and chat, email, games, go in chatrooms, etc etc. It was the Facebook of those days.) an actual person that worked for AOL at the time. He introduced me to C++. Anyway, with respects to the moderators here and this forum being about web designing/developing(programming), probably best to stick with that. We don't want this thread to get locked as well, do we? I saw in another thread/post that you mentioned you wanted to build a game site with most likely using Wordpress. That's fine, but what made you decide to go with Wordpress? Also I see your style of learning is basically through interaction. A lot of people like learning like that and it's understandable as to why. Have you yet built a webpage that demonstrates some of the JavaScript knowledge you have attained thus far? It can be simple such as changing the background color of the webpage by having the user type in a background color into an input field and clicking on a button that says 'Change Color'. I also see you want to become a JavaScript wizard, but exactly in what regards? Like, in general... or... for basically what JavaScript is truly mean't for, client side scripting/programming via the browser(s)? I am sure it's both reasons, but to become a wizard, just like in any other wizardry, you need to practice by applying what you have learned. Experience is key. I'm no expert, but I can say that this is important. I met another computer wiz in those days, he introduced me to ms-dos (command line; the UN-graphical user interface of Windows; like shell/terminal in unix/linux) and some other 'leet' or 'l33t' (mean't cool, elite) stuff of those days. I was impressed with his knowledge and asked how he attained it, he simply said.. "trial and error". I did not understand what he mean't; did not understand how that related to computers when to me back then it sounded like something to do with law trials, courts, judges, lawyers, errors in trials?? I soon discovered what he mean't and that was that. Don't get too overwhelmed with learning many languages at once. One at a time. Usually if you learn one language(like JavaScript) really well, learning another will be much more simple.
  7. Yes basically it is a series of commands that are written into a single file and when the file(script) is executed, it executes the commands within that file as if you're putting in those commands one by one in the terminal. To me though this is shell programming because you're writing a series of statements/instructions in a file when upon executing the file, it will do whatever you intended the file(script/program) to do; like programming with PHP, JavaScript, C++ etc. But yes, you can also do shell programming at the command terminal itself like the following: if [ -f /documents/textfile.txt ]; then echo "true"; fi but to me, when I read/hear of shell programming it is in the way I described. Perhaps others may have a different interpretation/perspective.
  8. Shell programming from the way I understand it is, is basically how I described. You can write a shell script that can have if and else statements, etc etc. Shell scripts are usually saved with .sh extension and can usually be executed by going to the directory the file(script) is in and typing for example: ./myscript.sh from the command terminal(shell). It seems like when you mentioned shell programming, you were referring to entering commands in the shell/terminal. That is not necessarily shell programming. That is basically just typing commands in the shell/terminal. The command ls for example lists files for the current working directory. To see your current working directory, you can type in the command terminal/shell, pwd. To change directories, you type cd and the name of the directory you want to change to. For example: cd documents
  9. Shell programming is not necessarily web developing but you can use shell programming to do certain tasks on the server( server: basically a computer with unix/linux) for you by writing shell programs that interact with a program on the server that does something for you. Example would be like image manipulation(s). A shell program can be written to interact with an image manipulation program on the server, where you can call the shell script(program) from a PHP script to be executed to manipulate/edit an image.
  10. When you move the mouse, the e.clientX here: _dragElement.style.left = (_offsetX + e.clientX - _startX) + 'px'; changes values resulting in _dragElement.style.left value changing which drags/moves the element.
  11. Don E

    Magic in arrays

    In the instance when using arr.length between the square brackets like on the second line, does JS interpret arr.length as 100 there instead of 101 in that instance? (I see that it does but was wondering why in that instance. Thanks.)
  12. Don E

    Magic in arrays

    I believe it's because arrays start at 0 and the .length property counts from 1. So you have 100 indexes for arr.. you then add to the 101 index using the length property value( which is 101) the value "elem." From 0 to 100, the length for arr is 101.
  13. When a user begins a session, that session is set for that user. If another user, that session is set for that user. Sessions are set via the server; information per user/session is saved on the server until the user somehow ends the session. As long as the user has not clicked any logout links or closed their browser, the session will be active for that user until they do something to end their current session. I don't think it is possible for an admin or another user to end another users' session not unless the admin somehow makes the user do something to end that users' session like clicking on a logout link that goes to a page to destroy that users' session etc. IF there is a way to destroy another users' session without making the user do something to end that session or re-direct them to another page for the sessions to end, I wasn't aware. One thing you can do is, if a user violates something in the "members" area and their session should be ended, redirect them to another page that destroys/ends that users' session resulting in them being logged out. OR, if a user violates something in a members area, disable all controls/features for that user until they eventually themselves close their browser.. or simply just redirect them to a page that ends their session. If you were thinking that an admin can see a list of users and next to that users' name is a button that reads 'end session' for that user (to log them out) and by clicking on that button will end that particular users' session, I don't think that is possible in PHP. If so, had no idea.
  14. Don E

    ModSecurity

    Hello, Is anyone familiar with ModSecurity? I was wondering if anyone knows if or if it's possible for ModSecurity to hinder or prevent a website from being properly indexed by search engines. I have the default rules that come with ModSecurity along with additional rules by OWASP. Sometimes I notice in the logs modsecurity giving 403's to authentic bots like google bot(s) for example because of things like 'missing header' etc. Thanks in advance.
  15. Operating system is the universe that we know of. It's been created/programmed by... what we currently understand as the 'best' programmer in existence. This programmer is known by many names, depending on your belief system(if you have one). On a smaller scale, some would say Bill Gates created a universe(Operating system) once called MS-DOS. Then from there, this universe expanded, sorta like how our universe does, from MS-DOS to Windows 1.0, then to 2.0, 3.0, Windows 95, Windows 98, etc etc.
  16. It seems that it is entering the first if statement then. Is $_POST['date'] a HTML checkbox as well? $_POST['date'] for some reason is considered 'set' when being checked in the isset() function. Typically if the checkbox is 'checked', it is considered 'set' for the isset() function and NOT set if it's NOT checked. If its not a checkbox but a input of type "text," regardless if there is a value to it or not, it will be considered 'set' to the isset() function. If possible, posting the HTML form that goes with this code would be great.
  17. Besides the value not being sent to the unchecked_table, what else happened...? Did the page redirect to home.php or did you get any errors?
  18. Don E

    Creating php project

    scientist, I wondered what was web matrix as well but it appears its web building software from/by microsoft that the developers of w3schools.com have their visitors download in order to follow the web building demo they have there now. I can only imagine microsoft and w3schools.com have some kind of relationship if they're going to the extent to have their users download webmatrix to follow their web building demo.
  19. gregaryb I went through the same exact thing with paypal as well. I agree about their documentation being a bit poorly written. lol Good to know you've got it figured out.
  20. gregaryb, In this thread: http://w3schools.invisionzone.com/index.php?showtopic=50827 you made some time ago, I responded by supplying a link to another thread that basically goes into what the video above is basically about. Just thought I'd let you know incase you missed it. Good luck.
  21. Perhaps someone else may go into the details as to why that happens with setInterval but here is a way how to use setInterval to get the same results like how you did with setTimeout: <!DOCTYPE hmtl><html lang = "en-US"> <head><meta charset = "UTF-8"><script type = "text/javascript"> window.onload = myFunction; var i = 11; var clearT; function myFunction() { //document.getElementById("output").innerHTML = display(); clearT = setInterval(display, 1000); } function display() { i--; var prompting; if (i < 0) // less than 0 so that 0 can be displayed when count down done { i = 11; // set to 11 like above so countdown displays 10 prompting = confirm("Do you want to go?"); if (prompting == true) { clearInterval(clearT); window.location = "http://www.google.com"; } } else { //return "You will be re-directed in " + i; document.getElementById("output").innerHTML = "You will be re-directed in " + i; } } </script></head><body> <div id = "output"></div></body></html>
  22. I'm not aware of any JS array property/method that has .contains (maybe there is). However, try changing myFunction2 to: function myFunction2() { for (var index=0; index < fruits.length; ++index) { if (fruits[index] === "Kiwi") { document.getElementById("boolean").innerHTML = "true"; } }}
  23. If you want to remember a value or whatever it may be on a website no matter what page you're on for that particular website, $_SESSION is an option. $_COOKIE is another option but if you're going to have sensitive data, probably best stored in $_SESSIONs instead of cookie. The reason why imo substituting sessions for other super globals is not good idea is because sessions and their data are stored on the server per user. This is mainly why it's recommended to use sessions when dealing with sensitive data that needs remembering for that users' visit/time on the site. They are short lived too. If/when user closes the browser, they are destroyed. So not sure how you can use something else besides cookies that's similar to sessions that were set in stone most likely by the PHP dudes in white lab coats.
  24. Don E

    Paypal API

    See this thread: http://w3schools.invisionzone.com/index.php?showtopic=49902 Hopefully it can give you some help/insight.
×
×
  • Create New...