Jump to content

Attilitus

Members
  • Posts

    39
  • Joined

  • Last visited

    Never

Everything posted by Attilitus

  1. Hm... so I guess there are no non-tamperable unique-to-server variables in PHP? That is rather disheartening. I guess I will just have to be extra tricky. Is there anyway to "set" the variable to the proper value before running the relavent code though?
  2. There has got to be some fundamentally unchangable unique "call" that one could make for PHP...
  3. Hm... So would that be a relatively unfakable method of returning the domain name of the script? Any additional anti-cheating methods would be greatly appreciated too, to prevent the bypassing of an external call-home. edit: I believe that php merely treats the getenv function variables as merely "different" but still modifiable ones. Can someone confirm/deny this?
  4. No this is part of a php script licensing system, so being able to change the variable by modifying server-side script is indeed a problem. The code itself would of course be encrypted but, inclusion would be easily possible. Is there anyway to set the server variable to the proper domain, or perhaps a better means of verifying the information of the server running the file? Thanks in advance!
  5. I have developed a lightweight, but very secure, php licensing system using fairly simple methods. My main question is, how reliable is the $_SERVER['HTTP_HOST'] variable? I have dealt with security on all other levels, but I have my doubts as to whether or not using that variable as an authentification method would be completely secure. Are there any known methods for manipulating that value to display something other than the actual domain running the script? If so are there any ways to counteract these efforts, or perhaps a better method of verification?
  6. Ah, well that is good to know thanks for the info. It is not exactly a matter of national security, but it is important that things  run cleanly at least 98% of the time, just for the sake of having a well-working script. The reason why I would like to avoid using a traditional cron job is mainly because I want the script to be as user friendly as possible, and am attempting to maintain near-universal compatability. A manual cron job set-up is just not something to which I am willing to resort. Thanks alot for the info! I would ask again though, what do you think would be the chances of such a job running more than once on a relatively high-traffic site? Perhaps if the timestamp was updated before the main queries were run things could be tightened up a bit? (The queries cover a large number of rows)
  7. How would I set that up purely within my php script? It is necessary to not use any kind of external application to run the cron job. A separate php file is fine, though.
  8. I was probably not entirely clear. This is not a "cron job" this is a wholly php device within one of my scripts that is acting in replacement of a cron job. Whenever the script is loaded by a user, it checks the time against the last stored time in the database. If there is a difference between those two times of lets say 30 minutes, then a few queries will run. After those queries have run, the timestamp in the database is updated to reflect the current time. Therefore, the queries will not run again until the difference between the last recorded timestamp and the current time again reaches a certain level. My question is whether there is a chance that two users would trigger the script at the same time, and the queries that are supposed to run only once every 30 minutes could run twice. Here is the relavent code, but it really isn't very helpful: [code] //if negative this defaults to 0 if(crontimecheck($userinfo)==0){ //this stuff needs to only happen once per time period <<Do stuff>> //set database value that crontimecheck() checks to current time. setlastactivity(time()); } [/code]
  9. I have a script which basically does the following: Reads time stamp from database. Checks timestamp against current time. If the difference is above a certain amount a code snippet runs which then sets the timestamp in the database to the current time. Now... this works fine and dandy in theory. But is it possible that this script will actually run multiple times if users access it near the same time? If this is a valid concern, would there be any way to lessen the chances of this occuring?
  10. I was just wondering how universal the php time() function was between different servers. I am planning to write a syncing scripts which will require a fairly exact comparison of the local server time with an external server's time using the PHP time() function. Is there slight variation possible? (If so, in what magnitude?) Or is this something that is fairly user configurable. I am not very knowledgable with the "backend" of php, so any information would be greatly appreciated. Thanks!
  11. Sorry for the double post... (there is no edit option?) I just thought that I would add that I would prefer to do this in PHP "if possible." That is why I have been trying using location headers at the start of loaded content, ect. Regardless of the method, however, I know that I need to have a "second ajax call" I just do not know how to make a second ajax call at the same time as another without having the user click a second link. I know that there must be an easy way to do it, I am just very new and inexperienced to the world of AJAx. Thanks for any help you guys might be able to provide.
  12. Right... but how exactly would I go about doing that? I have no experience with javascript, so I have basically been using the engines I could find to set myself up.
  13. I have two ajax "Divs" on my page and would like certain content when loaded in one Div to trigger the other div to reload as well. (In order to update stats, ect.) Is this possible?
×
×
  • 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.