RSS and Atom Feed Reader Online

Code Sharing Repository

Public source code sharing repository

Highlight String Example - Code Sharing Repository

'; echo ' '; highlight_string($string); echo ' '; ?>

Posted on 20 January 2019 | 8:37 pm

Sending HTML Email With Image - Code Sharing Repository

Email With Image Sending HTML Email With Image ' . $message . ' '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; $headers .= 'From:...

Posted on 20 January 2019 | 7:48 pm

Display and log errors - Code Sharing Repository

error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('log_errors', TRUE); ini_set('error_log', 'php.log');

Posted on 8 December 2018 | 5:48 pm

Block googlebot robots.txt - Code Sharing Repository

User-agent: Googlebot Disallow: /

Posted on 28 November 2018 | 12:01 am

htaccess redirect http to https - Code Sharing Repository

RewriteEngine On RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Posted on 23 June 2018 | 11:07 am

ADOdb - Check if MySQL query executed successfully - Code Sharing Repository

Prepare('DELETE FROM mytable WHERE id = ' . $DB->qstr($id) . ''); if ($DB->Execute($sql) === false) { print $DB->ErrorMsg(); } if ($DB->affected_rows() !== 0) { //true } ?>

Posted on 29 May 2018 | 4:20 pm

Article Structured data Schema Markup - Code Sharing Repository

My Article Name My Description Name Website Articles 4 out of 5 stars based on 1 votes

Posted on 21 May 2018 | 4:27 am

Bootstrap 4 change input placeholder color - Code Sharing Repository

.form-control::-webkit-input-placeholder { color: #bbb; }

Posted on 13 May 2018 | 3:51 pm

Change arrow size and colors in Bootstraps carousel - Code Sharing Repository

.carousel-control-prev-icon { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23f8f8f8' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E"); }...

Posted on 24 April 2018 | 2:27 pm

ADOdb count number of records - Code Sharing Repository

$recordSet = $conn->Execute('SELECT * FROM mytable where published = '.$conn->qstr('1').' or published = '.$conn->qstr('2').' order by id DESC'); $counter = $recordSet->recordCount(); echo $counter;

Posted on 8 April 2018 | 4:14 am

Exim - How to block certain domain - Code Sharing Repository

1. In etc/exim/exim.conf after this line: # $Cambridge: exim/exim-src/src/configure.default,v 1.14 2009/10/16 07:46:13 tom Exp $ put this line: system_filter = /etc/exim/filters 2. Create file filters in /etc/exim/ folder with code: if $header_from: contains...

Posted on 28 February 2018 | 11:02 am

SSH IPTables command to block IP Address - Code Sharing Repository

[[email protected] ~]# iptables -A INPUT -s x.xx.xx.xx -p tcp --dport 25 -j REJECT [[email protected] ~]# service iptables save [[email protected] ~]# service iptables restart

Posted on 27 February 2018 | 9:41 am

Warning: purging the environment. Suggested action: use keep_environment issue - Code Sharing Repository

1. Open etc/exim/exim.conf 2. Directly after this code line: # $Cambridge: exim/exim-src/src/configure.default,v 1.14 2009/10/16 07:46:13 tom Exp $ add: keep_environment = X-SOURCE : X-SOURCE-ARGS : X-SOURCE-DIR add_environment =...

Posted on 27 February 2018 | 9:25 am

htaccess redirect www to non-www - Code Sharing Repository

RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

Posted on 19 February 2018 | 11:28 pm

Smarty XML / RSS example file - Code Sharing Repository

Site Name Site Description http://www.example.com {section name=foo loop=$foo} {$foo[foo].progname|stripslashes|replace:"'":''|replace:'"':''|escape:'htmlall':'UTF-8'|replace:'&':'...

Posted on 9 February 2018 | 6:41 am

Full text search order by relevance - Code Sharing Repository

SELECT SQL_CALC_FOUND_ROWS *, MATCH (title,description) AGAINST ('Text') as score FROM posts WHERE MATCH (title,description) AGAINST ('Text') ORDER by score DESC;

Posted on 13 December 2017 | 5:18 am

Image in Textarea - Code Sharing Repository

#textarea { border:#eee solid 1px; background:#fff url(images/myimage.png) no-repeat left 10px top 8px; } /* */

Posted on 7 December 2017 | 2:24 am

Search MySQL utf8 and latin1 - Code Sharing Repository

SELECT * FROM tablename WHERE MATCH (name,description) AGAINST ('phrase' IN BOOLEAN MODE) or convert(cast(convert(name using latin1) as binary) using utf8) = 'phrase' or convert(cast(convert(description using latin1) as binary) using utf8) = 'phrase'; SELECT *...

Posted on 16 November 2017 | 7:47 pm

Avoid spam points - Message only has text/html MIME parts - Code Sharing Repository

"."\r\n"; $header .= "Organization: My Company Name \r\n"; $header .= "Content-Type: multipart/alternative;boundary=" . $uid . "\r\n"; $body = "This is a MIME encoded message."; $body .= "\r\n\r\n--" . $uid . "\r\n";...

Posted on 14 November 2017 | 4:52 am