Skip to content

Instantly share code, notes, and snippets.

I hate github!

Moslem moslem-hady

I hate github!
View GitHub Profile
randyburden / BooleanJsonConverter.cs
Created Jul 4, 2013
A Json.NET JsonConverter that can handle converting the following values into boolean values: true, false, yes, no, y, n, 1, 0.
View BooleanJsonConverter.cs
using System;
using Newtonsoft.Json;
namespace JsonConverters
/// <summary>
/// Handles converting JSON string values into a C# boolean data type.
/// </summary>
public class BooleanJsonConverter : JsonConverter
sh-sh-dev / DigikalaProduct.php
Last active Sep 8, 2021
Digikala Products Info
View DigikalaProduct.php
function digikalaProduct($PID) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "$PID");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["ApplicationVersion: 1.4.1", "Mobile-Agent: MobileApp/iOS/V-1.4.1/351D78CE-5DA9-42DB-8820-CF296C21A2B1"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Digikala/1 CFNetwork/975.0.3 Darwin/18.2.0");
$output = curl_exec($ch);