Skip to content

Instantly share code, notes, and snippets.

View ShiponKarmakar's full-sized avatar
😍
<?php echo "Love Programming"; ?>

Shipon Karmakar ShiponKarmakar

😍
<?php echo "Love Programming"; ?>
View GitHub Profile
@ShiponKarmakar
ShiponKarmakar / ipcheck.php
Created September 22, 2021 10:36
login to your hosting package and go to the file manager and in the public_html create a file ipcheck.php and add the following code
<html>
<body>
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://api.ipify.org/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
curl_close ($ch);
echo "Your Server's outbound IP : ".$contents;
?>
@ShiponKarmakar
ShiponKarmakar / update-hide.php
Created July 27, 2019 09:28
Hide all WordPress update notifications in dashboard
<?php
// hide update notifications
function remove_wp_core_updates(){
global $wp_version;
return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_wp_core_updates'); //hide updates for WordPress itself
add_filter('pre_site_transient_update_plugins','remove_wp_core_updates'); //hide updates for all plugins
@ShiponKarmakar
ShiponKarmakar / php.json
Last active August 7, 2019 08:49
VS code PHP User Snippet
{
// Function
"function": {
"prefix": "function",
"body": [
"function $1() {",
" $2",
"}",
],
"description": "Normal Function"
@ShiponKarmakar
ShiponKarmakar / WHMCS-search-integration.html
Last active March 30, 2019 09:30
Here’s the WHMCS search/integration code:
<form action="cart.php?a=add&domain=register" method="post">
Domain: <input type="text" name="sld" size="20" />
<select name="tld">
<option>.com</option>
<option>.net</option>
<option>.org</option>
<option>.eu</option>
<option>.us</option>
</select>
<input type="submit" value="Go" />
@ShiponKarmakar
ShiponKarmakar / like-it-enqueue.php
Created December 22, 2018 16:54 — forked from shizhua/like-it-enqueue.php
Add a like button without a plugin in WordPress
add_action( 'wp_enqueue_scripts', 'pt_like_it_scripts' );
function pt_like_it_scripts() {
if( is_single() ) {
wp_enqueue_style( 'like-it', trailingslashit( plugin_dir_url( __FILE__ ) ).'css/like-it.css' );
if (!wp_script_is( 'jquery', 'enqueued' )) {
wp_enqueue_script( 'jquery' );// Comment this line if you theme has already loaded jQuery
}
wp_enqueue_script( 'like-it', trailingslashit( plugin_dir_url( __FILE__ ) ).'js/like-it.js', array('jquery'), '1.0', true );
@ShiponKarmakar
ShiponKarmakar / README.MD
Created December 17, 2018 16:51 — forked from AminulBD/README.MD
BD Domain ability checker with php.

(DOT) .BD DOMAIN ABILITY CHECKER

You can use this as WHMCS or other domain checker to check ability of .bd domains. This is a concept for how to create your own whois server.

WARNING: WHEN YOU USE THIS SCRIPT, YOU KNOW WHAT YOU ARE DOING. I'M NOT RESPONSIVE FOR ANY PROBLEM

First login to your server (Any distro) and install the following dependencies.

For ubuntu user:

apt-get install xinetd dnsutils php-cli

<?php
require_once "Mail.php";
$from = "Sandra Sender <info@hasmukh.co.in>";
$to = "Ramona Recipient <test@gmail.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "fortune.solidhosting.pro";
$port = "587";
$username = "info@shipon .com";
$password = "8vabTURf%j+G";
@ShiponKarmakar
ShiponKarmakar / .htaccess
Last active January 23, 2024 02:20
Most Useful and Helpful .htaccess Code
#stop directory browsing
Options All -Indexes
# SSL Https active Force non-www
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@ShiponKarmakar
ShiponKarmakar / contact-form.php
Last active October 7, 2018 18:27
PHP Scripts
<?php
// Naming Constant
define( "RECIPIENT_NAME", "John Doe" );
define( "RECIPIENT_EMAIL", "someone@mail.com" );
// Values
$success = false;
$senderName = isset( $_POST['username'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['username'] ) : "";