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
#Python 3.4.3 | |
import sys | |
import urllib | |
def getImage(save_directory,url): | |
img = urllib.request.urlopen(url) | |
localfile = open(save_directory + url[url.rfind('/')+1:], 'wb') | |
localfile.write(img.read()) | |
img.close() |
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 5.6.7 --> | |
<form action="" method="post"> | |
name: <input type="text" name="name" /> | |
age: <input type="text" name="age" /> | |
<input type="submit"/> | |
</form> | |
<?php | |
$dsn = "mysql:dbname=databese;host=localhost"; | |
$user = "username"; |
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
# Python 3.4.3 | |
# tweepy 3.3.0 | |
# coding: utf-8 | |
import sys | |
import webbrowser | |
import tweepy | |
from tweepy.streaming import StreamListener | |
from tweepy import Stream | |
import shelve |
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 | |
session_start(); | |
require "twitteroauth/autoload.php"; | |
use Abraham\TwitterOAuth\TwitterOAuth; | |
$tw = "Tweet test"; | |
define('CONSUMER_KEY', 'hoge'); | |
define('CONSUMER_SECRET','foo'); |
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
<html> | |
<head> | |
<title>Callback</title> | |
</head> | |
<body> | |
<?php | |
session_start(); | |
require "twitteroauth/autoload.php"; | |
use Abraham\TwitterOAuth\TwitterOAuth; |
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
<html> | |
<head> | |
<title>Tweet</title> | |
</head> | |
<body> | |
<pre> | |
<?php | |
session_start(); | |
require "twitteroauth/autoload.php"; |
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 | |
#初期設定を共通化して手間を省く(hogeとfoo,barは差し替え必須) | |
define('CONSUMER_KEY', 'hogehogehoge'); | |
define('CONSUMER_SECRET','foofoofoo'); | |
define('OAUTH_CALLBACK', 'http://localhost/barbarbarbar/callback.php'); | |
?> |
OlderNewer