This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$text = file_get_contents('https://v6.ident.me/'); | |
echo $text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/setup' | |
Bundler.require | |
require 'sinatra/reloader' if development? | |
require 'sinatra/activerecord' | |
require './models' | |
helpers do | |
include Rack::Utils | |
alias_method :h,:escape_html | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Output for View | |
$(document).ready(function(){ | |
$('#inv-1').load('/js/count.php',function(responce){ | |
$('#use-count').numerator( { | |
easing: 'linear', // アニメーションの動き | |
duration: 1000, // アニメーションの時間(ms) | |
toValue: responce, // どこまでカウントアップするか | |
delimiter: ',', // 3桁ごとに区切る値 | |
rounding: 0 // 小数点以下の桁数 | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$filename = '.htaccess'; | |
// a+じゃなくてwだったらわざわざ消さなくていいらしい | |
$fp = fopen($filename,'w'); | |
// EU Deny 配布元 | |
$ip_lists = file_get_contents("https://ipv4.fetus.jp/krfilter.4.apache.txt"); | |
// Headerとかとか。 | |
$ip_set .= "<ifModule mod_headers.c>"."\n"; | |
$ip_set .= "Header always set X-XSS-Protection '1; mode=block'"."\n"; | |
$ip_set .= "</ifModule>"."\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clientId; | |
$.ajax({ | |
url: './count.php' // Simple count up, | |
type: 'GET', | |
dataType: 'text', | |
cache: false, | |
async: false | |
}) | |
.done((response) => { | |
var count = response; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
Object.defineProperty(document,"referrer",{value:"変更したいURL"}); | |
$.ajax({ | |
url:'読み込みたいURL', | |
type:'GET', | |
dataType:'text', | |
}) | |
.done((data) => { | |
したい処理 | |
}) |