Jump to content

kickassamd

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

About kickassamd

  • Birthday 05/07/1984

Contact Methods

  • AIM
    Circuit256
  • MSN
    kickassamd@hotmail.com
  • Website URL
    http://www.kickassamd.com
  • Yahoo
    KickassAMD

Profile Information

  • Gender
    Male
  • Location
    Dallas Tx

kickassamd's Achievements

Member

Member (2/5)

0

Reputation

  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.
×
×
  • 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.