This is a naïve implementation of string escaping for JavaScript. As you're actually trying to format a string for use in JavaScript, a much better solution would be to use... read more →
The easiest way is to place a constant in the index.php and check in the other php files if this constant exists. If not, let the script die. index.php define('APP',... read more →
The basic function of this is to find any URLs in the block of text and turn them into hyperlinks. It will only find URLs if they are properly formatted,... read more →
To ignore SSL in Curl , add this two lines. I hope problem will be solved. curl_setopt($process, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($process,CURLOPT_SSL_VERIFYHOST, FALSE); Reference : https://stackoverflow.com/questions/16220172/php-curl-ssl-verifypeer-option-doesnt-have-effect
Sometimes, when we make a curl call to third party services, we get an error curl: (60) SSL certificate : unable to get local issuer certificate. This error occurs because... read more →
Ternary operator logic is the process of using "(condition) ? (true return value) : (false return value)" statements to shorten your if/else structures. What Does Ternary Logic Look Like? ... read more →
Code Sample :
rand — Generate a random integer Sample Code :
sprintf — Return a formatted string Example Code : Joomla Code : echo ''.JTEXT::sprintf(( 'Follow %s on Demo!'), strip_tags($demo_account_name)).''; echo... read more →
Just use ENT_QUOTES everywhere. PHP gives the option in case you need it, but 99% of the time you don't. Escaping the quotes unnecessarily is harmless. htmlspecialchars($string, ENT_QUOTES, 'UTF-8');... read more →