質問編集履歴

2

ポートを8000にした理由を加筆

2016/07/11 05:11

投稿

TaiseiFuji
TaiseiFuji

スコア8

test CHANGED
File without changes
test CHANGED
@@ -45,6 +45,18 @@
45
45
  と実行してからhttp://localhost:8000を開きました
46
46
 
47
47
  ###試したこと
48
+
49
+ 色々調べると多くのサイトが指定していたポート8000番に接続しました
50
+
51
+ ドットインストール http://dotinstall.com/lessons/basic_php_v2/34103
52
+
53
+ Qiita http://qiita.com/higuma/items/b23ca9d96dac49999ab9
54
+
55
+ goo質問1 http://oshiete.goo.ne.jp/qa/6213862.html
56
+
57
+ PHP manual http://php.net/manual/ja/features.commandline.webserver.php
58
+
59
+
48
60
 
49
61
  localhostや127.0.0.1にはアクセスできました
50
62
 

1

twitter\.phpの中身を追加

2016/07/11 05:11

投稿

TaiseiFuji
TaiseiFuji

スコア8

test CHANGED
File without changes
test CHANGED
@@ -50,6 +50,44 @@
50
50
 
51
51
  色々ググりましたがlocalhostに接続できてlocalhost:8000に接続できない例はありませんでした。
52
52
 
53
+ twitter.phpの中身はhttp://qiita.com/tsunet111/items/9309801cd3e3bcf6e32aこのサイトを参考に
54
+
55
+ ```
56
+
57
+ <?php
58
+
59
+
60
+
61
+ //OAuthライブラリ読み込み
62
+
63
+ require "twtteroauth/autoload.php";
64
+
65
+ use Abraham\TwitterOAuth\TwiiterOAuth;
66
+
67
+
68
+
69
+ $consumerKey="2uuSjMd6C4gyasaHv1h1OST6A";
70
+
71
+ $consumerSecret ="bmI2mi7oO1nYtSau7Y5mh60xhj9C4F5qcpcKILM0da7geKMvMC";
72
+
73
+ $accessToken="631281120-rPHrL6ugonfbw9UeGH3Ap8NC4xhBWR1mXLFBX7Pf";
74
+
75
+ $accessTokenSecret="5oFXMH4HmhhumkheyyIPze2SqNm9LJ1fi7ZNV0wXSDBaw";
76
+
77
+
78
+
79
+ $connection=new TwitterOAuth($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);
80
+
81
+ $res=$connection->post("statuses/update",array("status"=>"testmessage"));
82
+
83
+
84
+
85
+ var_dump($res);
86
+
87
+ ```
88
+
89
+ カレントディレクトリには他のサイトの情報を元に作った別のindex.phpやtwitteroauthなんかがあります。
90
+
53
91
 
54
92
 
55
93
  ###補足情報(言語/FW/ツール等のバージョンなど)