Code Monkey home page Code Monkey logo

netputweets's Introduction

奶瓶腿 - NetPutweets

抱着奶瓶腿 享受推的乐趣

介绍

「奶瓶腿」是第三方 Twitter 网页客户端(更适合在移动设备上使用),基于 Dabr 项目,由 @NetPuter 维护。同时也感谢 @iChada @17th @yegle @luosheng @AvelineSwan @shadowglenelf @Orz_C 的协助。

如果你关注奶瓶 @NetPuter 和他折腾的一些项目,并且希望帮助他,欢迎以捐助的形式使他更好地折腾。

架设

系统需求

  1. 支持 PHP5+ 的国外服务器 (Apache/Nginx)
  2. 支持 URL Rewrite
  3. 支持 cURL 库
  4. 支持 GD 库(可选,用于开启图片预览代理的图片压缩功能)

使用 Git (力荐)###

在服务器中运行 git clone git://github.com/netputer/netputweets.git 将得到的 netputweets 文件夹中的所有内容复制到目标目录中,直接在浏览器中访问、安装、使用。

在升级时,请运行 git pull ,然后删除 config.php 并重新访问、安装。

下载发布版本

点击这里下载并解压缩所有文件到服务器 Web 目录中,并从浏览器中访问、安装、使用。

在升级时,请重复上面的步骤,然后删除 config.php 并重新访问、安装。

提示

  1. 修改文件时请使用不会添加 BOM 的编辑器(Windows 上如 wordpad 等)。
  2. 由于图片预览代理和图片压缩功能非常消耗服务器的资源,请谨慎使用。如需使用图片预览代理,请务必在安装时填写 Embedly API Key 字段。
  3. 可视化邀请页面:invite.php。如果升级后发现邀请列表丢失,请手动将 invitec.php 的内容(除去第一行代码)复制到 invited 中,并保持最后一行为空行。
  4. 使用 Nginx 的用户请将 dabr.conf 包含到站点配置文件中。如果站点使用 FastCGI 并通过 https 访问时遇到问题,请确认配置文件中存在 fastcgi_param HTTPS on; 的选项。
  5. 如有任何问题,请通过 GitHub Issues 反馈。

netputweets's People

Contributors

ayanamist avatar comicchang avatar jimmyxu avatar marguerite avatar netputer avatar shadowglen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netputweets's Issues

htaccess杀爬虫的问题

用在一个公共SSL虚拟空间中时碰到的问题
不用https的时候没问题
用https的时候 htaccess修改为如下

RewriteBase /[path]/
IndexIgnore *
Options -Indexes
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} (bot|spider|search|soso|bing|sogou|yahoo|yodao|robozilla) [NC]
RewriteRule ^(.*)$ - [L,R=404]
[之后省略]

运行报RewriteRule: invalid HTTP response code for flag 'R'
我根据 http://www.zoneself.org/2012/03/01/content_928.html 这里的提示改成了

RewriteRule ^(.*)$ https://%{SERVER_NAME} [R=301,L]

就没问题了
但是不知道原因出在哪里

IMGPROXY 图片无法显示

开启图片代理后,返回的图片均报错“Notice: Use of undefined constant IMGPROXY ...”。
我不懂PHP,按字面意思在 img.php 里加入 require 'config.php'; 后解决…

之前用的都好好的,也不知道为什么突然冒出了这么个问题…

c3acd8f424版本中查看用户的列表中的用户列表中的用户资料会返回404错误

升级到使用is_https()的版本后图片代理失效

升级到009286e9f4并重新生成config.php后发现只要打开图片代理,页面内所有img.php?u=xxxx的图片都显示为500错误。
尝试将config.php中的'$base_url = is_https() ? "https" : "http";'注释掉并手动填写BASE_URL后图片显示恢复正常。

代理认证失效

"通过 Twitter OAuth 登录"正常,iTAP失效。
应该是Twitter修改了API,目前输入用户名和密码提交后authorize_post页面只有一行"You are being redirected."

embrr上也存在相同问题:
AstroProfundis/embrr#70

HTTPS自动判断无效

config.php 中的第二行不能保证正确判断链接是否为https:

$base_url = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] != "off" ? "https" : "http"; 

例如,在appfog上架设时,则总是判断为普通http链接,因为appfog上$_SERVER["HTTPS"]总是为空,若上传如下代码:

<?php
    echo $_SERVER["HTTPS"];
?>

则打开为空白页面。

建议更改为类似embr等网页端的,直接由用户定义完整 base_url 的方式。

升级到r211后,验证完成后服务器返回500错误(没有bcsub函数)

具体的现象是,使用官方验证或代理验证后,返回服务器内部错误。

服务器上的日志返回以下错误信息:
[Mon Mar 18 13:25:31 2013] [warn] [client 121.235.xxx.xxx] mod_fcgid: stderr: PHPFatal error: Call to undefined function bcsub() in /var/www/xxx/common/twitter.php on line 1403

搜了一下,然后看了一下服务器上的phpinfo,并没这个函数,要解决这个问题貌似必须重新编译php,但是我使用的是CentOS的官方源……(VPS上懒的编译……

看了一下commit,貌似是这个commit引入的bcsub():6268027

这个……怎么办呢…… =,=

转义符bug

FF浏览器下发推

测试 转义符bug " \ ^ ` ~ . / ,
'

会变成

测试 转义符bug " \ ^ ` ~ . / ,
'

最近经常碰到stdClass错误

Fatal error: Cannot use object of type stdClass as array in common/class.embedly.php on line 72

通常是在登录成功后,不知道是不是跟Twitter间歇性休克有关系,没做什么修改过一阵子就自动好了

htaccess注释补充

主目录下的htaccess注释建议加入如下内容

如客户端没有放在主目录下 请自行修改oauthproxy目录内的htaccess

将[path]内的内容改为客户端路径

RewriteBase /[path]/oauthproxy/

图标的相对地址bug

相对地址这里有个bug:
把图标按钮的选项打开后 所有非index页面上的按钮图标都会死掉

比如user页面里的reply按钮 它的src是"images/reply.png"
正常情况下是被解析成"xxx.com/images/reply.png" 但这里会被解析成"xxx.com/user/images/reply.png" 导致错误
我不知道这是我safari的问题 还是服务器代码的问题...

提示:服务器不支持 URL Rewrite ,奶瓶腿将无法使用。

我目前也遇到这种情况,我用的是windows azure的云虚拟机,虚拟的ubuntu server 系统。
1.我确定我的apache2 开启了 sudo a2enmod rewrite,我也把配置文件中的改成了AllowOverride All,并且sudo service apache2 restart,但是还是粗线这样的问题……
2.我确定.htaccess文件活着并且存在于根目录下。
2.url rewrite 这个模块是需要服务器本身的机器支持的还是ubuntu 系统支持?本屌是ubuntu新手,见笑见笑。
附上我的网址:http://embr.cloudapp.net/netputweets/setup.php

相对路径的可行性

今天在修复 #39 错误时,发现目前已有的函数可以做到准确获得相对路径。而基于相对路径的地址,不管是链接还是 header 跳转,都免去了判断协议的需要。

b503e44

代理登录报403错误

打开https://t.orzdream.com/,点Proxy链接登录,输入正确的用户名和密码点Sign In,立即报错:403 Forbidden: The server understood the request, but is refusing to fulfill it. 此时的网址是:https://t.orzdream.com/oauthproxy/authorize_post (见附图)

如果点Sign In with Twitter OAuth链接使用官方认证则正常。

自建的奶瓶腿也出现这个问题,以前成功通过代理登录没有退出的仍可正常使用。换另外的帐号也如此。

netputer

response header 里 set-cookie 太多重复的信息了

cache-control: post-check=0, pre-check=0
cache-control: no-store, no-cache, must-revalidate
content-encoding: br
content-type: text/html; charset=utf-8
date: Mon, 11 Jun 2018 08:34:03 GMT
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
expires: Sat, 26 Jul 1997 05:00:00 GMT
last-modified: Mon, 11 Jun 2018 08:33:53 +0000
pragma: no-cache
server: cloudflare
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
set-cookie: utc_offset=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
status: 200

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.