Skip to content

Instantly share code, notes, and snippets.

View chernysh2909's full-sized avatar

Aleksandr chernysh2909

  • Ukraine, Kharkiv
View GitHub Profile
header("Access-Control-Allow-Origin: *"); //add this CORS header to enable any domain to send HTTP requests to these endpoints:
header("Access-Control-Allow-Methods: GET, POST");
header("Access-Control-Allow-Headers: Content-Type");
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body{
function curlPost($url, array $params){
$result = file_get_contents($url, false, stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($params)
)
)));
return $result;
}
.show-flex-xl {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex
}
.shown-xl {
display: block!important
}
<?php
//Создаем многомерный числовой (индексный) массив
$arr1 = array(
array(
'KIA',
'BMW',
'MAZDA',
'OPEL'
),
array(
app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});
let request = require('request');
let fs = require('fs');
let FormData = require('form-data');
let tokken = '828922035:AAGr4ZF1yoISDiKOFt_rBHi1k6q8Cz-uuHk';
let chatId = -1001320778442;
let url = 'https://api.telegram.org/bot' + tokken + '/sendPhoto';
var formData = {
chat_id: chatId,
for (const key of Object.keys(os)) {
console.log(key, os[key]);
}
[[!AjaxForm?
&form=`tpl.AjaxForm`
&snippet=`FormIt`
&hooks=`recaptchav2,email,FormItSaveForm`
&emailSubject=`Тестовое сообщение`
&emailTo=`myemail@mail.ru`
&emailFrom=`no-reply@mysite.ru`
&emailTpl=`tpl.email`
&validate=`name:minLength=^2^,
email:email:required,
/* font weight */
.font-weight-100 { font-weight:100 !important}
.font-weight-300 { font-weight:300 !important}
.font-weight-400 { font-weight:400 !important}
.font-weight-600 { font-weight:600 !important}
.font-weight-700 { font-weight:800 !important}
.font-weight-800 { font-weight:800 !important}
/* text property */
.text-transform-unset { text-transform:unset !important}