Jump to content

kickassamd

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

Everything posted by kickassamd

  1. Thank you! I was looking for this function and boom it hit me!
  2. This works if say I do 192.168.0.1 - 192.168.1.254 it will work. However doing 192.168.0.1 - 192.168.1.10 will only generate up to .10 on both IP schemes. I see why, but I cannot figure out a way around this... Thanks! $start = explode('.', '192.168.10.1'); $end = explode('.', '192.168.11.10'); /** * Final output... */ $a = 0; $b = 0; $c = 0; $d = 0; // First segment for ($a = $start[0]; $a < 1 + $end[0]; $a++) { // Second segment for ($b = $start[1]; $b < 1 + $end[1]; $b++) { // Third segment for ($c = $start[2]; $c < 1 + $end[2]; $c++) { // Fourth segment for ($d = $start[3]; $d < 1 + $end[3]; $d++) { echo "{$a}.{$b}.{$c}.{$d}<br />"; } } } }
  3. Try this... preg_match("/<link>(.*)</link>/", $str, $matches);
  4. I have installed isapi_rewrite from HeliconTech for IIS I currently have RewriteRule ^(.*?\.php)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA] But this requires site.com/index.php/page/news to do index.php?page=news I am trying to get it to do site.com/page/news and send the results to site.com/index.php?page=news Basically no filename in the URL. Is there anyone good with rewrite rules that can help? Thanks!
  5. <?php class aClassName { public function register($varName, $varValue) { // In here i would like to get the classes name that called this function. } } class thisWillCallaClassName { public function blah() { // I would like to call aClassName->register() from here and set this classes name automatically with no extra parameters to register } } ?> Is it possible to have a class that when called from within another class can get the classes name that is calling a function within. IE class people class bob -> calls a method in the people class, and the people class knows it was the class bob who is talking to it.
  6. Agreed if you are making your own class, center it around the newer mysqli extension. My class can use both "drivers" since I do alot of development and not all clients have access to mySQL v4.1+.
  7. I built my own class, that can handle both mysql and mysqli extensions. The reason I use my own is for error reporting, query logging and many other items that help me out in development.
  8. There is a billion reasons I would use Windows (especially Server 2008) before Linux servers, but using Plesk atleast v8 you can set the schedule to run every x minutes \ days etc etc and what script to run etc etc. With HELM I had to specify the path to PHP IE c:\php\php-cgi.exe c:\domains\domain.com\wwwroot\script.php This worked.
  9. Yeah that is one of my concerns, the current status etc etc of what they are doing about it, is there anything we can do for it now?
  10. Too bad 64bit has been around for quite awhile already, and its just now being adopted into the PC world...
  11. What is going to happen once the date goes beyond January 1st 2037, PHPs time() function returns an int, and the max an int can hold is 2147483647. They have a planned fix for this? Or what is going to happen?
  12. Well obviously, I am meaning for like core objects, like database, smarty, session etc etc. Do you guys create them all @ once or across files.
  13. Just wondering how others handle creating isntances of mutliple objects... I usually have 1 file that includes all my classes then from there i create all my instances there. How does everyone else do it?
  14. Sure id love to see how others do it.
  15. Was wondering if anyone has any examples of a query builder... public function compileInsertQuery($table, $data, $autoClean = true) { // Valid data if (is_array($data)) { $fields = ""; $values = ""; foreach ($data as $key => $value) { $fields .= "{$this->_colDelimiters['left']}{$key}{$this->_colDelimiters['right']}, "; if ($autoClean) { $values .= "{$this->_strDelimiters['left']}{$this->cleanString($value)}{$this->_strlDelimiters['right']}, "; } else { $values .= "{$this->_strDelimiters['left']}{$value}{$this->_colDelimiters['right']}, "; } } // Strip last , from string $fields = preg_replace("/, $/", "", $fields); $values = preg_replace("/, $/", "", $values); $query = "INSERT INTO {$this->addTablePrefix($table)} ({$fields}) VALUES({$values})"; return $query; } } Is mine but i was wondering if anyone knows of anyways to improve it etc.
  16. I cannot figure out how to get preg_match to match = <= >= != I had a simple function that looked for each but the problem with that is it found = when it was really <= so is there a way with regex to match ONLY the character supplied?
  17. Ah gots it thank you!
  18. Been trying to extract the kilobytes sent number from this string... ive tried Kilobytes sent [0-9] Kilobytes sent \d+ Kilobytes sent \d And i get no matches... preg_match('{Kilobytes sent \d+}', $this->_netStats, $matches); Any help is very appreciated!
  19. Yeah i have the db structure... Just lost on the PHP end.
  20. 1 table id, label, link and parent id and order
  21. Im confused on storing a menu system with a parent \ child relationship in mySQL and how to retreive and display it. Example... MAIN---- ---- SUBITEM ---- SUBITEM MAIN---- ----- SUBITEM etc etc. Thanks guys!
  22. its not that, this exact same script works on another server just not on this box.
  23. I can login to PHPMyAdmin from the server itself. But once i got to a remote machine (on same network) and login it just sends me write back to the login page no notices no errors nothing.... Even if i type jibber into the username \ password fields and press login it just sends me right back to the login page. For a demo go here http://phpmyadmin.seriussoft.com Login with anything random and press login... Obviously "fdfdsfdsfdsf324" and "fdfdsr323333!!!" is not a valid username \ password so PHPMyAdmin should return an error but it doesnt. Just reloads the page. Any reason? Thanks!
  24. He wants to help make your site better and more secure, If you dont care dont do it, If you dont have time, dont do it.... "We dont care that the wheels of the car we just made dont stay on" just bogus that is whats wrong with developers today, they dont care to take the time to things the correct way the first time around.
  25. Have you contacted your host? Last time I had an issue like this b4 I moved to Windows hosting was with Host Gator and I couldnt execute a few PHP files because of the UID or something was incorrect, contacted them and walla.
×
×
  • 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.