Jump to content

boompa

Members
  • Posts

    305
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boompa

  1. This version of PHP is way too old (end-of-life was over 5 years ago!), and therefore insecure. Version 5.5 is going to reach end-of-life in a few months. You need to upgrade to one of the supported versions: https://secure.php.net/supported-versions.php
  2. You need to learn how to read errors and warnings, as these are perfectly clear: Why is the getProperty2 method setup to take an argument? It looks like you copy/pasted the function for setProperty2() and forgot to remove the argument.
  3. Use explode.
  4. Use wordwrap on the output: https://secure.php.net/manual/en/function.wordwrap.php
  5. Congratulations! Your super-crappy host has updated PHP to a version that is no longer supported after last year. You need to find yourself a *real* host that supports at least 5.5, move your code there and do the updating required in your code.
  6. Please move your code to use something other than the deprecated mysql_ functions (mysqli or PDO) and use prepared statements. You are totally open to SQL injection attacks.
  7. The ; at the end of this line if(!preg_match('/[a-z]/',$title)); means the if statement will have no effect, and the line immediately following will always be executed.
  8. The answer is right in the documentation: You should be using the password_hash function.
  9. To get a valid WSDL from that location you need to append ?wsdl to the url: https://api.mindbodyonline.com/0_5/SaleService.asmx?wsdl
  10. You are making a mysqli instance here and assigning it to the variable $db: $db=new mysqli('localhost', 'DanCojocaru', 'danutzsrl', 'dan cojocaru'); Therefore, you should be calling the query method on *that* variable, $db.
  11. Don't use Pear; as you can see the last stable release was over 5 years ago. Use either Swiftmailer or PHPmailer.
  12. Try setting the curl option CURLOPT_FOLLOWLOCATION to true. Looks like there's a redirect occurring now.
  13. Something else for you to read. Or, you could use the Sentinel library, or perhaps Aura.Auth. The point is, really, not to try to re-invent the wheel...especially in such a critical component.
  14. Use PDO or mysqli and prepared statements. Read the manual entry.
  15. Might want to double-check the argument to date in this line: ':date' => date('Y-m-y H:i:s'),
  16. You can use mcrypt with AES in ECB mode.
  17. You will make your mailing life easier if you take the time to learn how to use a third-party mailing library like PHPmailer or Swiftmailer and take advantage of them.
  18. Good for you for moving to PDO. Now, read the manual page for PDO's query() method. Note the following in in the Return Values section" . You do not account for the fact that your query can fail before you go trying to use it in your foreach loop. I note also that you can't necessary be blamed for this, because the example provided in the documentation does the same. Better would be something like the following, at least until you're sure you've got the query right: $result = $pdo->query(); if ($result === false) { die(print_r($pdo->errorInfo())); } // Successful query foreach($result as $row) { // Do your output }
  19. Assuming the query function being called is the one you posted (which doesn't necessarily make sense because it looks like both of these functions are in the same class, but you're invoking the query function on $this->_db rather than $this), you are returning $this from your query function, which shouldn't be falsy.
  20. You probably want to use socket_getpeername() on the accepted socket to get the remote IP address.
  21. Perhaps this will help you: <?php $xml = simplexml_load_file('radio.xml'); print("Day: {$xml->DayData->Date}\n"); foreach($xml->DayData->Rotation as $rotation) { print("\tRotation Time: {$rotation->Time}\n"); foreach($rotation->SpotData as $spot) { print("\t\tTitle: {$spot->SpotTitle} Length: {$spot->Length}\n"); } } Running this code on the command line results in: php -f radio.php Day: 2015-05-11 Rotation Time: 6a - 7p Title: Biore Length: 30 Title: Motel 6 Length: 30 Rotation Time: 6a - 7p Title: Biore Length: 30 Title: Motel 6 Length: 30 Rotation Time: 6a - 7p Title: Sprint/Boost Promotional Offer Length: 60
  22. There's an example right on the documentation for wp_login_url, under "Default Usage".
  23. That would seem to indicate that the problem is the $memberid variable is not matching the result members you're testing.
×
×
  • 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.