-
Posts
4,953 -
Joined
-
Last visited
Posts posted by darkfreaks
-
-
have you tried adding the header?
response.addHeader("Access-Control-Allow-Origin","*"); // allows all domains
-
f I understood it right you are doing an XMLHttpRequest to a different domain than your page is on. So the browser is blocking it as it usually allows a request in the same origin for security reasons.
Regular web pages can use the XMLHttpRequest object to send and receive data from remote servers, but they're limited by the same origin policy. Extensions aren't so limited. An extension can talk to remote servers outside of its origin, as long as it first requests cross-origin permissions.
example of how to do an offsite request using CORS: http://www.html5rocks.com/en/tutorials/cors/
-
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>
-
here is a phpseclib link that shows examples how to do this
http://phpseclib.sourceforge.net/rsa/examples.html#encrypt,enc2
-
-
also
print_r($xml, 1); // print_r does not accept an integer as boolean
change to:
print_r($xml, true);
-
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.
-
$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
-
-
might be easier to use a framework for that like PHPmailer
make sure you format your headers right to avoid spam filters.
-
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.
-
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.
-
-
-
Recommended: Declare your variables. Or use isset() to check if they are declared before referencing them.
-
-
check your headers next time.
$headers .= "From:".$name."<".$email.">\r\n";
-
have you tried jquery multiselect?
-
sounds like the file is being overwritten. have you tried LOCK_EX????
file_put_contents($file, $txt, FILE_APPEND | LOCK_EX);
-
money_format may be a better solution.
-
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.
-
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.
-
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
-
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.
-
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; }
-
what is "Fatal error: Unsupported operand types in" mean?
in PHP Coding Help
Posted
fixed it up for you, had several syntax errors causing issues also using count() instead of num_row()