Skip to content

Instantly share code, notes, and snippets.

View hurata's full-sized avatar
🏠
Working from home

Burak Hurata hurata

🏠
Working from home
View GitHub Profile
public function ageTotalData($from = null){
$ageData = $this->getAgeData($from);
$ageData = json_decode($ageData, true);
$total18to24UniqueVisit = 0;
$total18to24Revenue = 0;
$total18to24Conversions = 0;
@hurata
hurata / Zerobounce.net Email Validate PHP.php
Last active January 24, 2022 16:20
Zerobounce.net Email Validate PHP
<?php
public $apiKey = "*********************";
public function curl($url){
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSLVERSION, 6);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
@hurata
hurata / mongodb-create-user.md
Last active October 3, 2020 13:14
MongoDB Create User
db.createUser(
  {
    user: "Code",
    pwd: "147147",
    roles: [
       { role: "readWrite", db: "scrap" },
      
    ]
 }
@hurata
hurata / go_colly_scrap_example.go
Created July 4, 2020 09:30
Go Language Colly Scrap Example
package main
import (
"context"
"fmt"
"github.com/gocolly/colly"
"github.com/gocolly/colly/proxy"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
"go.mongodb.org/mongo-driver/mongo/options"
@hurata
hurata / Dashboard Insert Control Update
Created June 6, 2020 15:33
Dashboard Insert Control Update
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
header("Cache-Control: no-store , no-cahce, must-revalidate");
header("Cache-Control: post-check=0 , pre-check=0", false);
header("Pragma: no-cache");
class Dashboard extends CI_Controller {
public function index(){
if ($_SESSION['login'] != true ){
redirect(base_url());
<div class="container" style="margin-top: 50px">
<div class="row">
<div class="col-sm-12">
<table id="example" class="display responsive nowrap" style="width:100%">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">App ID</th>
<th scope="col">App Name</th>
<th scope="col">App Logo</th>
@hurata
hurata / RegisterModel.php
Created April 11, 2020 12:18
Medium model example
<?php
class RegisterModel{
public $tableName = "users";
public function insert($data = array()){
// Standart PDO kodlarıyla yazalım. Yine kafa karışıklığı oluşturmaması için
@hurata
hurata / controller.php
Created April 11, 2020 11:28
Medium controller example.
<?php
class Register{
public function index(){
$this->load->model('RegisterModel'); // Oluşturduğumuz model fonksiyonlarını controller'a load ederek burada kullanılabilir hale getiriyoruz.
if (isset($_POST['register'])){ // Post kontrolü sağlanıyor ve değişkenlere atama yapıyoruz
$mail = $_POST['mail'];
$password = $_POST['password'];
@hurata
hurata / view.php
Created April 11, 2020 11:00
MVC View example
<!-- Register Form -->
<div class="container">
<div class="row">
<div class="signup-form">
<form action="" method="post">
<h2>Create Free Account</h2>
<p class="hint-text">It's FREE and takes a minute.</p>
<div class="form-group">
<input type="email" class="form-control" name="email" placeholder="Email" required="required">
</div>
@hurata
hurata / deMorganLaws2.php
Last active April 5, 2020 14:50
De Morgan Laws example 2
<?php
$array = array(
"countries" => array(
0 => array("country" => null, "population" => null, "stateCount" => null),
1 => array("country" => "USA", "population" => 320000000, "stateCount" => 50),
2 => array("country" => "Turkey", "population" => 83000000, "stateCount" => null)
)
);