Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited

Everything posted by steelmanronald06

  1. *sigh* I see my old teammates have messed around with the forum software and the Topic Solved mod is no longer in place. Oh well, back to the old school way of doing things! Topic Solved! :-)
  2. HA! You'd think that after searching "php determine windows drive letter", "php windows drive letter" and about 20 other combos that that solution would have been of the TOP results! Thanks! Much appreciated.
  3. In order to use the disk_total_space() function in PHP, you must supply the directory that it should look to. For unix this is pretty simple because I just have it look to / and get the total disk space. I'm using a conditional statement to determine Unix or Windows system. What I haven't been able to determine, is the Windows Drive Letter. For my windows server, I know I can just put in C: and it works. This has to be user independent. After reading through different articles on google, and even an enhancement request on php.net where someone contributed code that would create a function to do this, I still have been unable to find a method that will determine the root drive letter of a Windows Server. Any insight to a PHP function, a home-brew function, or an article on this topic is greatly appreciated. Two days of no results has me slightly frustrated, haha!
  4. How are you creating the calendars? Have you looked into Google Domains and using the Google API to give each user his/her own calendar? Then all they must do is download Google Sync. Other than that you're going to have to (A) learn how to develop web based applications for the blackberry, or (B) set up a BES. If you don't have a blackberry you're probably going to have a hard time with this...so you might want to post in the Freelance and see if you can find a blackberry developer to do this for you.
  5. Okay, so that made the SQL statement valid. Here is what I'm dealing with. If I put the sql code directly into the console method in my controller (you can see this because I left the code but commented it out), it works fine and inserts the data into the database. However if I move the SQL over to a method within the model class, create a method in the controller class to call that model method and then call that controller method within the console method, it only outputs a blank page. Here is a pastebin of both of my classes. Controller is listed first then the model. The main method I'm using is the console method within the controller. http://pastebin.com/R1YPxKDJ Any advice/direction would be great. I feel like it is something small, but I'm just not seeing it. No errors are outputting and no errors are being written to my error log.
  6. Using codeigniter and having an issue: $sql = "LOAD DATA LOCAL INFILE '".$_SERVER['DOCUMENT_ROOT']."/junk/2010-07-19_ddna_current_APJ.csv' INTO TABLE `pulled_openx_clicks` FIELDS TERMINATED BY '\\t' ENCLOSED BY '\"' ESCAPED BY '\\' LINES TERMINATED BY '\\n' IGNORE 1 LINES"; $data['MyError'] = $this->db->query($sql); Any insight on this would be great. Also note that where i'm doing terminated by for fields and lines, it is using \\t and \\n. I did have this set to \t and \n, but then the error read like this:
  7. LOL, so do I. I'd love for business to explode and us to get enough money to get ahead even if we don't need to be at the time. I'd rather be ahead than struggling behind.
  8. We plan on getting the dedicated fiber when 1 of 3 things happen: 1) From monitored usage we see that the current line is getting to bogged down 2) We get enough clients that we build a second server 3) Business explodes and we have the money to throw into it without regard to other factors.
  9. Oh. I meant unlimited bandwidth usage per month. down is 6.5 and up is either 6 or 5.5. I don't remember which one we purchased. i think we changed the package slightly, but can't remember 100%.
  10. This board if for coding help only. Please read the rules. If you have a problem with soome code not working, or giving an error, you may post that. However, this post seems like it would be best suited for Freelancing.
  11. I guess I'll start off with the link: http://picasaweb.google.com/rlsteelman/QuadrabyteServer?feat=directlink After saving as much money as possible, my roommate and myself bought all the parts to our new server. This is the start of a new business venture to provide web hosting to the greater community. We are hoping to reach out to area business, orginizations and individuals in our community as well as providing web hosting to our clients at the design firm I work at (where I normally sign them up for a 3rd party web host, I'll now be able to sign them up with my company). It is a very exciting prospect. The server sports 4 1 TB harddrives (WD Black Cavier). The first two are on a Raid 1 and the second two are on a Raid 1, providing perfect mirrors for maximum data retention. Those two sets are bonded on a Raid 0 to improve speed. The Raid 10 was a little difficult to set up, as I was using Linux and there are very little places of information on Raid 10 with LInux, but it was a huge success. From there I installed CentOS 5.0 on the system and, to provide our clients with the best possible service, installed WHM+CPanel. The motherboard is an Asus P7P55D-E Deluxe running an Intel i7 Quad Core chip and an amazing Black Widow SpinQ Thermal CPU Fan. The power supply is a ToughPower Cable Management 1200 Watt power supply. Since graphics wasn't a huge issue we went with a basic GeForce 8400 graphics card and an HP DVD Writer. The memory is DDR3 dual channel 4GB. All of this nestles nicely in a Corsair 800D Obsidian Series tower box, sporting a nice Hot Swap for up to 4 3.5" SATA drives. Perfect for drive failure and quick replacement. From there we have 6 fans keeping the system nice and cool to prevent overheating. All of this, of course, has been over clocked by the Asus motherboard providing a blazing fast system (had some trouble getting the OC on the fly remote to work with linux). The system itself has 6.5 Mbps internet connection running through a secure firewall (with iptables as a failsafe), sits on an APC Battery Backup with a time span of 2 hours, and sports a backup generator. All in all, we spent a nice chunk of money on this system. The next step is to get the site launched and start pulling in clients (we'll be launching at quadrabyte.net, so keep us bookmarked). I'm really impressed with the way the system turned out. Though I wish I could build another somewhere off site for some off site mirroring, I did sign up for the Amazon S3 cloud and nighly backups go offsite to Amazon via a secure connection. For now I guess I'll just have to suffer :-P Anyways, tell me what you think of the server! Would love input. We'll be building another, hopefully very soon, and any comments or suggestions for improvement would be greatly appreciated!
  12. http://lmgtfy.com/?q=what+server+will+the+new+google+Caffeine+be+installed+on%3F
  13. Funny you should ask. Three weeks ago I bought a kit from borders that has a training book, cd with 12 practice exams, and flash cards. I'm hoping to take mine soon.
  14. Link: http://www.google.com/experimental/
  15. In your case, the page your getting is part of a new google search. If you have a google account (gmail) and have filled in a majority of your profile, you will start getting focused search results. For instance I have Gmail, Orkut, Youtube, and Google Feed Reader. When I search something it goes through my gmail, orkut, youtube, and feed reader and searches websites I might be gettting feeds from, links in emails, youtube video descripts, etc and returns those sites first (gives them higher priority).
  16. Perfect, Alex. Thanks a million. I obviously need to take a step away from the computer. Just spent 5 hours coding Google Maps API into our site, linking it to a geocode library so I can get long/lat, editing all the stupid little buttons and everything. Anyways, thanks again.
  17. Awesome, AlexWD. Like I said, my brain is shutting down. Completely spaced on the php strip_tag() function. Anyone have any ideas on the second problem? I can't figure out why <a href""> tags would be thrown at the end of my domain name.
  18. Kris, you'd want to look into pagination. For your query you can do: mysql_query("SELECT * FROM table_name ORDER BY `id` DESC LIMIT 10"); For your pagination see: http://www.phpfreaks.com/tutorial/basic-pagination
  19. Okay, here's the deal. I think my eyes are crossing from working on the computer for the past 6 hours (google maps api, twitter, etc). Very frustrating. Anyways, I'm having a problem that I think revolves with explode(). Go to: http://www.oldhatcreative.com/newohtestground/twitter/ Okay now hover over a link for someone. Lets say oldhatcreative. The link reads: http://www.twitter.com/oldhatcreative</uri> </author> Obviously I don't want it to read like that, but I can't see to figure out how to strip out that </uri> </author>. By all accounts it should be there. Second problem. Hover over any of the links in the actual tweets. They display as: http://www.oldhatcreative.com/newohtestground/twitter/"http://linkdomain.tld" I want links to parse as normal html links...and they should. If you go to http://search.twitter.com/search.atom?q=from%3aoldhatcreative and View Source, you'll see that twitter nicely puts that stuff into <a href="">...</a> tags for me! Now for my code. <?php /* Relative Time Function based on code from http://stackoverflow.com/questions/11/how-do-i-calculate-relative-time/501415#501415 For use in the "Parse Twitter Feeds" code below */ define("SECOND", 1); define("MINUTE", 60 * SECOND); define("HOUR", 60 * MINUTE); define("DAY", 24 * HOUR); define("MONTH", 30 * DAY); function relativeTime($time) { $delta = strtotime('+2 hours') - $time; if ($delta < 2 * MINUTE) { return "1 min ago"; } if ($delta < 45 * MINUTE) { return floor($delta / MINUTE) . " min ago"; } if ($delta < 90 * MINUTE) { return "1 hour ago"; } if ($delta < 24 * HOUR) { return floor($delta / HOUR) . " hours ago"; } if ($delta < 48 * HOUR) { return "yesterday"; } if ($delta < 30 * DAY) { return floor($delta / DAY) . " days ago"; } if ($delta < 12 * MONTH) { $months = floor($delta / DAY / 30); return $months <= 1 ? "1 month ago" : $months . " months ago"; } else { $years = floor($delta / DAY / 365); return $years <= 1 ? "1 year ago" : $years . " years ago"; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <?php // Pull multiple acccounts by listing here. Seperate with a space $usernames = "dustinschmidt OldHatCreative ixdeb xxghostxx"; // Number of tweets to pull, IN TOTAL! $limit = "15"; // Show usernames? 0=No, 1=Yes $show = 1; // POI: When using HTML, escape double-quotations like this: \" // This comes before the entire block of tweets $prefix = "<h1>Old Hat Twitter Feeds</h1><ul>"; // This comes before each tweet on the feed. $prefix_sub = "<li>"; // This comes after the username but before the tweet content. $wedge = " says: "; $suffix_sub = "</li>"; // This comes after the entire block of tweets. $suffix = "</ul>"; // POI: Beyond here, have good PHP knowledge before altering function parse_feed($usernames, $limit, $show, $prefix_sub, $wedge, $suffix_sub) { // Use some regex to get the usernames correct $usernames = str_replace(" ", "+OR+from%3A", $usernames); // Push that into the feed $feed = "http://search.twitter.com/search.atom?q=from%3a" . $usernames . "&rpp=" . $limit; $feed = file_get_contents($feed); $feed = str_replace("&", "&", $feed); $feed = str_replace("&alt;a href="", "<a href=\"", $feed); $feed = str_replace("">", "\">", $feed); $feed = str_replace("</a>", "</a>", $feed); $feed = str_replace("<", "<", $feed); $feed = str_replace(">", ">", $feed); $clean = explode("<entry>", $feed); $amount = count($clean) - 1; for ($i = 1; $i <= $amount; $i++) { $entry_close = explode("</entry>", $clean[$i]); $clean_content_1 = explode("<content type=\"html\">", $entry_close[0]); $clean_content = explode("</content>", $clean_content_1[1]); $clean_name_2 = explode("<name>", $entry_close[0]); $clean_name_1 = explode("(", $clean_name_2[1]); $clean_name = explode(")</name>", $clean_name_1[1]); $clean_user = explode(" {", $clean_name_2[1]); $clean_lower_user = strtolower($clean_user[0]); $clean_uri_1 = explode("<uri>", $entry_close[0]); $clean_uri = explode("</uri>", $clean_uri_1[1]); $clean_time_1 = explode("<published>", $entry_close[0]); $clean_time = explode("</published>", $clean_time_1[1]); $unix_time = strtotime($clean_time[0]); $pretty_time = relativeTime($unix_time); $super_clean_name_2 = $clean_name[1]; $super_clean_name_1 = explode (".com/", $super_clean_name_2); $super_clean_name = $super_clean_name_1[1]; echo $prefix_sub; if ($show >= 1) { echo "<a href=\"http://www.twitter.com/" . $super_clean_name . "\">" . $super_clean_name . "</a> " . $wedge; } echo $clean_content[0]; echo $suffix_sub; } } echo $prefix; parse_feed($usernames, $limit, $show, $prefix_sub, $wedge, $suffix_sub); echo $suffix; ?> <body> </body> </html>
  20. If you are just wanting to offer something for your clients I'd go with reseller hosting. If you are looking to expand a little beyond that try 1and1 dedicated servers. They come pre-installed with Plesk9 which is a great control panel for host providers.
  • 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.