Jump to content

darkfreaks

Members
  • Posts

    4,953
  • Joined

  • Last visited

Everything posted by darkfreaks

  1. fixed it up for you, had several syntax errors causing issues also using count() instead of num_row() <?php $columns = 2; if(isset($_GET['member'])) { $display = ceil(count($_GET['member'])); $rows = ($display / $columns); while ($row = $display) { $data[] = $row; } echo "<table border='1'>"; for($i = 0; $i < $rows; $i++) { echo "<tr>"; for($j = 0; $j < $columns; $j++) { if(isset($data[$i + ($j * $row)])) { echo "<td>".$data[$i + ($j * $row)]."</td>"; $count = $count+1; } } echo "</tr>"; } } ?>
  2. have you tried adding the header? response.addHeader("Access-Control-Allow-Origin","*"); // allows all domains
  3. example of how to do an offsite request using CORS: http://www.html5rocks.com/en/tutorials/cors/
  4. should read up on how sign() and verify() work before you attempt to fool around with it. http://search.cpan.org/~vipul/Crypt-RSA-1.99/lib/Crypt/RSA/SS/PKCS1v15.pm Here's an example of how to create signatures and verify signatures with this library: * <code> * <?php * include 'Crypt/RSA.php'; * * $rsa = new Crypt_RSA(); * extract($rsa->createKey()); * * $plaintext = 'terrafrost'; * * $rsa->loadKey($privatekey); * $signature = $rsa->sign($plaintext); * * $rsa->loadKey($publickey); * echo $rsa->verify($plaintext, $signature) ? 'verified' : 'unverified'; * ?> * </code>
  5. here is a phpseclib link that shows examples how to do this http://phpseclib.sourceforge.net/rsa/examples.html#encrypt,enc2
  6. colorizing an image(GD): http://php.net/manual/en/function.imagefilter.php example: http://blog.svnlabs.com/php-colorize-an-image-using-gd/#.VCAxAGO0thE
  7. also print_r($xml, 1); // print_r does not accept an integer as boolean change to: print_r($xml, true);
  8. you had a Syntax error there was no closing paren ) to the cookies part of the code here is the corrected line below curl_setopt ($ch, CURLOPT_COOKIE,"Användar Cookies Go Here"); if you continue receiving errors please paste the error below.
  9. $slider_pagination = get_the_title(); // just echos the title change to: $slider_pagination = echo '<a href="' . get_permalink($post->ID) . '">' .get_the_title() . '</a>'; // now becomes a linked title
  10. https://github.com/craig552uk/getImage/blob/master/getimage.php
  11. might be easier to use a framework for that like PHPmailer make sure you format your headers right to avoid spam filters.
  12. yeah what the video says you need a testing server setup & configured properly before you connect in DW (WAMP) it also shows you how to setup a localhost using DW & connect.
  13. http://www.html-form-guide.com/php-form/php-form-validation.html should read how to use the class first. maybe you would get more of an idea how it works.
  14. you need a SMS gateway like Twilio https://www.twilio.com/blog/2012/04/build-a-simple-phone-verification-with-twilio-php-mysql-and-jquery.html
  15. Recommended: Declare your variables. Or use isset() to check if they are declared before referencing them.
  16. check your headers next time. $headers .= "From:".$name."<".$email.">\r\n";
  17. have you tried jquery multiselect?
  18. sounds like the file is being overwritten. have you tried LOCK_EX???? file_put_contents($file, $txt, FILE_APPEND | LOCK_EX);
  19. money_format may be a better solution.
  20. add this to the main functions in MPDF function getPageCount() { return count($this->pages); } then add a html-parser such string: $html = str_replace('{PAGECNT}', $this->getPageCount(), $html); then you can insert {PAGECNT} in your parsed html to get the page count.
  21. Hence why you check your headers so they don't get sent to spam but even then that isn't 100% effective but it helps alot.
  22. you have an extra comma in your code and 'db' doesnt need single quotes around it. otherwise i think its fine. also do AND sqftHtd >= 'sqft' and not have a comma in between 2 AND
  23. like Req said you can't place PHP inside a .html file. like as mentioned you can do it entirely in JavaScript. or you might be able to get away with using Ajax which is a combination of PHP & JavaScript. <script>$(function() {$( "#datepicker" ).datepicker(({ dateFormat: "yy-mm-dd" })); }); </script> <form action="action.php"> </form> then in action.php you can process your form and compare.
  24. Here's a simple function for formatting phone numbers with 7 to 10 digits in a more European (or Swedish?) manner: function formatPhone($num) { $num = preg_replace('/[^0-9]/', '', $num); $len = strlen($num); if($len == 7) $num = preg_replace('/([0-9]{2})([0-9]{2})([0-9]{3})/', '$1 $2 $3', $num); elseif($len == 8) $num = preg_replace('/([0-9]{3})([0-9]{2})([0-9]{3})/', '$1 - $2 $3', $num); elseif($len == 9) $num = preg_replace('/([0-9]{3})([0-9]{2})([0-9]{2})([0-9]{2})/', '$1 - $2 $3 $4', $num); elseif($len == 10) $num = preg_replace('/([0-9]{3})([0-9]{2})([0-9]{2})([0-9]{3})/', '$1 - $2 $3 $4', $num); return $num; }
  25. http://www.google.com/recaptcha http://akismet.com/
×
×
  • 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.