Jump to content

Shinryuu

Members
  • Posts

    1,025
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Shinryuu

  1. So I was wondering a useful way to use php the other day and came up with a simple but extremely useful script. Firstly I want to make it clear that this is more for smaller site designers wanting to find out how to best improve their sites, however larger sites with more traffic may find it useful as well for different reasons. USES FOR SMALL SITES Learn how your users move around your site. Learn the most popular areas of your site. Help learn what can be done to move users to the areas of your site that you want. USES FOR LARGE SITES Learn when users are visiting broken links. Learn when users are trying to enter restricted areas. Learn what IP is most likely that of a spammy or otherwise disruptive user. OVERALL USE Learn what peak times are for your site. Identify when the best time for site maintenace is. The script is simple and will only create a plaintext log but you can refine it to use MySQL databases for storage. I advise putting the script after the page's html and styling is processed to avoid any major problems with displays being broken. Now to the fun part. Small sites: <?php $ip=$_SERVER['REMOTE_ADDR']; $page=$_SERVER['REQUEST_URI']; $dayassoc=getdate(); $output= $ip."\t".$page."\t".$dayassoc['mon']."/".$dayassoc['mday']."/".$dayassoc['year']."\t".$dayassoc['hours'].":".$dayassoc['minutes']."\r\n"; file_put_contents("tracking.txt", $output, FILE_APPEND); ?> put that on each page to get as detailed a listing as you can about how users interact with your site. You can include this on custom error pages as well and I'll explain that shortly. Large sites: I suggest only placing it on error pages, also replace "errorpagecode" with 401, 404, etc depending on the page you're putting it in. If you must put it in a trafficed area try to limit the amount of pages you paste it in to avoid collisions with file write requests. <?php $errcode="errorpagecode"; $ip=$_SERVER['REMOTE_ADDR']; $page=$_SERVER['REQUEST_URI']; $dayassoc=getdate(); $output= $ip."\t".$page."\t".$dayassoc['mon']."/".$dayassoc['mday']."/".$dayassoc['year']."\t".$dayassoc['hours'].":".$dayassoc['minutes']."\t".$errcode."\r\n"; file_put_contents("tracking.txt", $output, FILE_APPEND); ?> Feel free to leave questions and comments ; EDIT: Changed to use file_puts_contents() instead of messy, unintuitive c-like fopen/fputs/fclose per Byron's suggestion. EDIT 2: I should probably add that you'd want to keep people from accessing this file so in your root folder's .htaccess add something like: AuthUserFile "/home/user/.htpasswds/public_html/passwd" AuthName "Visitor Tracking" AuthType Basic <Files "tracking.txt">; require valid-user </Files> where AuthUserFile is the filepath to a nonpublic directory containing the user=>key pairs required to access the file. AuthName can be anything you want. Don't put the require valid-user directive outside the files tag as that will password protect your entire site.
  2. It's likely set that way by default as a security measure, don't point to resources with http:// use $_SERVER['DOCUMENT_ROOT']."myfolder/myfile.php" or relative paths.
  3. I think the key is this: Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/raffix/public_html/index.php on line 14 might wanna fix that. Every error on your page starts with the wrapper being disabled.
  4. Actually, can we still get a space boost for winning the design competitions? Not that they happen with regularity or anything, but, it's an option right?
  5. If you don't require JSP, RoR, or ASP then hopping to Stevie should help. Cody is not for users, it serves HelioHost and HelioNet.
  6. Yes but the admins really have better things to do, like work their paying jobs and spend time with their families, they can't be expected to baby us and look into every little thing that goes wrong with our accounts. An email notification sent to suspended accounts would probably be a good idea to help users know something needs their attention, but depending on the average amount of users suspended per day that may be a bad idea, just because we only see a handful of users request unsuspensions each day doesn't mean they're the only ones suspended. I'm not entirely sure what you're getting at by 'system mails', if you mean they're like activation emails sent to new users by the CMS you're using like a forum script or something, those are sent by your account not HH. You can turn these off or restrict them using your admin dashboard.
  7. It would be installed there yes, and we do not provide it, you'd have to buy one from digicert or one of the other Certificate Authorities out there, however I'm guessing you've worked out some tentative agreement with the bank on that matter? In which case once you have your dedicated IP you'd have to ask them to give you the SSL cert to upload into cPanel and then you'd be set to go. If they do give you the cert and limit it to your payment area you'll be getting errors if you try to do https://mysite.com
  8. After you buy a dedicated IP you can install your certificate if you already have one or generate a certificate signing request in cPanel to use when buying one, then upload the cert that you buy. Once the certificate is on the server in your cPanel you'll be able to access your site using https://
  9. 'fraid not, however you could probably implement some sort of error message for when connections aren't closing properly since mysql_close() returns a boolean value, true on successful close and false otherwise.
  10. The suspension page is just a warning that something's going wonky, don't make it sound like it's always a punishment, it rarely is. It's primary functions are: a ) alert the user that their site is running out of control. b ) prevent the server, and all other sites on it, from going down. Is it inconvenient? Yes. Is it a personal attack on a user? No, so don't make it sound like your being persecuted. We cannot just mail out a warning and wait for users to analyze their site when they get a chance as that could be days before the user gets the time to do so, so we suspend the account and when you come ask for an unsuspension it's assumed you now have the time to try and work out the kinks and your site is unsuspended, it's that simple.
  11. On PayPal and debit cards. Seems it's mostly hit or miss. On currency exchange. PayPal walks you through it, and it costs a little extra.
  12. How long has it been since you set up your account?
  13. Just post that you paid here and the Transaction ID or some sort of proof of payment. EDIT: Would probably be good to post your HelioHost username, server, and domain name as well.
  14. We only supply the IP and to get one PayPal $12 US to admin@heliohost.org, It's up to you to find a Certificate Authority to provide the certificate, or generate a self-signed one.
  15. I think I cleared neither browser- nor dns-cache, but I wouldn't take an oath on it. How could that affect my problem? You were looking at a cached page most likely and your add-on was fully working. Water under the bridge now though, if by this time tomorrow you still see a queued page clear your cache.
  16. Yes I believe not as HE would be buying the rights to use that IP on your behalf. Companies purchase batches of IPs and they're allowed to use these on the machines they administer so that's why I think not, though I may be wrong.
  17. Whatever the reason for your suspension this time, your history leaves me worried. 9 suspensions spanning multiple accounts, twice for multiple accounts, thrice for malware, and thrice for high server load plus this time.
  18. From your link: We use cPanel.
  19. To use HTTPS and your SSL Cert you need to first get a dedicated IP. The company we use requires a price of $12 US/yr for one. Use Paypal to send it to admin@heliohost.org and when the payment is confirmed you'll have a dedicated IP to use with your secure transactions.
  20. Lol, yeah, they kinda did that later on except they used 4. 4.i 4.ii 4.iii which seems more like the typist was having trouble keeping track of which instructions he was currently working on than anything else.
  21. It won't be, it's meant for web surfing, eCommerce, Social Networking and such, without an internet connection these devices are little more than paperweights. You could argue the same about Android tablets but at least there you can install games that may or may not require web access. Also if by some weird reason they do beat marketshare out of Windows, Chrome OS runs on a Linux kernel. A bit of irony that a company that makes billions on marketing can't be bothered marketing their own products o_O. Originally I'd heard about it while it was in development and figured I'd eventually try it out when it was released, that was the last I ever heard.
  22. I think he means in the quick install.
×
×
  • Create New...