Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. But that is a terrible idea as it completely breaks the encapsulation provided by a function in the first place.
  2. What part of the errors do you not understand? They seem pretty self explanatory to me.
  3. Do yourself a favour and follow a standard. See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
  4. To check if a user already exists with the username the user is inputting, simply execute a database query that SELECT's a record WHERE the username is what has been submitted. If you get a result, that username is already taken. I don't see how that kind of logic would change between languages.
  5. It is intentional. http://forums.phpfreaks.com/topic/142052-please-read-before-posting-here/
  6. The files should be stored outside of your web root and served up via php once the user has been authenticated. Should be plenty of examples around showing how this is done.
  7. It could be done with php yes. You'll need to be specific about what it is your stuck on. Were not here to write code for people.
  8. There is no such thing as a git server. Typically you access git repositories via ssh. Github and the like are just web interfaces to a git repository. You still push via ssh (or https if you wish).
  9. You haven't told the program to do that. This has already been answered.
  10. There are numerous articles on the benefits of database normalization. Google the subject. What your trying to do works against the entire relational model that relational database systems like MySQL are designed around and optimized for.
  11. You generally need to fork a project in order to contribute. So, the more forks you have, the more contributors you potentially have also.
  12. This entire page is loaded via Javascipt postbacks. The reason it is done this way is so as to make it difficult for people like you to scrape the site for data. I would suggest you contact the site owners and see if they have an API available. Otherwise, your in for some real headaches I'm afraid.
  13. Who doesn't have composer installed these days? Even if you don't, it's a single simple command to install it.
  14. http://ellislab.com/blog/entry/ellislab-seeking-new-owner-for-codeigniter The code base sux anyway.
  15. That should be casuing an error. You need to concatinate the variable to your string: header ('Location: http://localhost/carrotcycles/test-category/' . $pagelink); [/code[
  16. The values stored within the $_GET array will always be strings. So, you need to change: if ( $_GET["cal"] == + ) to if ($_GET["cal"] == '+')
  17. Surely this would all be better installed via Composer these days?
  18. That is a simple syntax error. You should be able to fix it yourself, if not, we need to see your actual (and only relevant) code.
  19. Email is working as expected, what email address do you expect the email to arrive at? PM me if you like.
  20. What exactly are you trying to validate the code with? If its html validation your talking about, why don't you show us the html this code produces?
  21. I recently did the same thing for work. We used a very simple mechanism where we created a public / private key pair which both system where aware of. On the client system you composer a querystring containing your public key and your data and your data hashed together with the private key. Something like: $private_key = 'fooisgood'; $s = 'public_key=thisisfoo&data=is_valid'; $hash = md5($s); $s .= '&hash=' . $hash You then send $s to your server system. On the receiving end we can now validate that this string was sent from a system that knows our private key by checking it. eg; $private_key = 'fooisgood'; $public_key = $_GET['public_key']; $data = $_GET['data']; $hash = $_GET['hash']; if (md5("public_key={$public_key}&data={$data}") == $hash) { // is_valid is true. } Of course I wouldn't use md5 and we added a bunch more stuff to this including a timestamp so that each request only had a short lifespan (60 seconds), but you get the idea. This is a VERY simple mechanism however. It is blown quite easily if your code gets distributed into the wrong hands as the algorithm is found out. However, for a lot of cases, this mechanism is fine.
×
×
  • 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.