Skip to content

Instantly share code, notes, and snippets.

View webag's full-sized avatar

Андрей webag

  • Pen&Brain
  • Kazan, Russian Federation
View GitHub Profile
@webag
webag / catalog-categories.php
Created June 16, 2017 09:15
youtube api video list php
<?
$channel_id = "UCrhuhV3v32U8DbI25GUsdIA";
$api_key = "AIzaSyCE-obn38anepy2x4JmF-wOdCseiE234Zo";
$video_list_query = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=". $channel_id. "&maxResults=10&order=date&type=video&key=". $api_key);
$video_list = json_decode($video_list_query);
?>
<?
foreach ($video_list->items as $video) :
@webag
webag / main.js
Created June 16, 2017 08:48
youtube api video list
/***********************
YouTube api feed BEGIN
***********************/
$(document).ready(function () {
var channelId = "UCrhuhV3v32U8DbI25GUsdIA";
var apiKey = "AIzaSyCE-obn38anepy2x4JmF-wOdCseiE234Zo";
$.ajax({
type: "GET",
url: "https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=" + channelId + "&maxResults=10&order=date&type=video&key=" + apiKey,
@webag
webag / send.php
Last active April 8, 2024 09:50
PHP Добавление контакта и сделки в amocrm с полями из формы сайта.
<?
//amo
//ПРЕДОПРЕДЕЛЯЕМЫЕ ПЕРЕМЕННЫЕ
$responsible_user_id = 7292136; //id ответственного по сделке, контакту, компании
$lead_name = 'Заявка с сайта'; //Название добавляемой сделки
$lead_status_id = '11331793'; //id этапа продаж, куда помещать сделку
$contact_name = $cname; //Название добавляемого контакта
$contact_phone = $cphone; //Телефон контакта
@webag
webag / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@webag
webag / form.html
Created June 26, 2014 13:45
Отправка почты с файловым вложением. Необходим phpmailer
<form class="ajax-form" enctype="multipart/form-data">
<input type="text" name="cname" placeholder="Введите имя">
<input type="text" name="ctel" placeholder="Введите телефон">
<input type="hidden" value="order" name="ctip">
<input name="attachfile" type="file">
<button type="submit" class="btn btn-primary">Отправить</button>
</form>