Giter Club home page Giter Club logo

12306's Introduction

12306自动刷票程序

放在服务器上随时刷票,爸妈再也不用担心我买不到票了~

#简介#

PHP写的12306服务器端刷票工具,一旦有票会通过邮件发送到指定邮箱,具有如下特点:

1.指定起始地、目的地、时间、车次(可以为空),且可以为多个;
2.有票立即发邮件告知(可以使用有短信提醒的邮箱)
3.配置简单

需求

1.Linux或者Windows(这个定时任务可能稍微麻烦点)系统
2.最好是服务器或者VPS,可以24小时挂着跑
3.PHP环境
4.可以使用SMTP发送邮件的邮箱帐号和密码

使用方法

1. 12306里的配置我就不一一解释了,不光要配置刷票的参数,还要配置邮箱参数,学过英语的都知道怎么配置;
2. 使用Linux crontab循环刷票:
	[root@localhost ~]# crontab -e
	
	* * * * * /usr/bin/php /root/12306.php
	
	解释:Crontab使用vi编辑器,输入i即可编辑,以上命令是每分钟刷一次,前提是要安装PHP,我这里是Centos下Yum安装的,如果不用,请使用 `whichis php`  命令找到PHP路径;最后一个是文件路径,pwd一下即可;如果想每两分钟刷一次请使用如下命令:


	*/2 * * * * /usr/bin/php /root/12306.php

如果有暗恋的妹子还没买到回家的票,就弄个服务器默默的刷去吧,哥在这么用行动支持你了~~

12306's People

Contributors

peanode avatar

Stargazers

Shizhong avatar  avatar Boboka avatar

Watchers

James Cloos avatar  avatar

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.