PHP to use cron cashing article sync to Sina, NetEase and other micro-bo

Source: Internet
Author: User
Tags cpanel wordpress blog
PHP use cron to achieve the article synchronization to Sina, NetEase and other micro-bo

1.tw2other

?

A PHP applet that supports Twitter sync to digu/sina/zuosa/follow5/9911/watercress Radio/fresh fruit hookup/Human Network/Renren/NetEase Weibo

?

Author: cluries
Author's homepage: http://cuies.com

Tw2other Download Address: http://code.google.com/p/tw2ohter/? or download from the attachment (not guaranteed the latest version)

?

Settings are as follows:

?

1) config.php File settings

With EditPlus, UltraEdit, notepad++ such as text editing software to open, modify:

?

Line 6th:

Define (' INTERVAL ', 50);
?

The 50 here is the update interval, if the use of free space, it is recommended to modify, because the fear of short time will give the space to provide a lot of pressure, space providers will easily seal your space.

?

Line 8th:

$twitterApi = ' http://twitter.com/';
?

This is the address of Twitter, if your Tw2other server is in the country and cannot access Twitter, then please change the value here to your own Twitter API address, of course, if the host is located abroad, there is no need to modify.

?

Line 10th:

$twitterUser = ' cluries ';
?

This is the user name of the cluries author on Twitter, and it's good to replace it with your own.

?

Line 19th

$twitterSyncLevel = 0;
?

This parameter can not be changed, if you really need to modify, then please follow the instructions to fill in. Finally, change the user name and password of the Weibo you plan to sync.

?

2) cron.php File settings

?

Line 8th

$url = ""

Here, fill in the address of the upload space, for example, you upload the project file to the/public_html/tw2other/folder in the space, so that the Tw2other PHP program is set to complete.

?

3) Space Cron settings

?

After the above files are set up, upload all the files to the/public_html/tw2other/folder of the space, where the Tw2other folder you can name any, but in order to clear or use this name good, remind a word, if you really replaced the other folder name, Remember to modify the URL of the cron.php Oh!

?

Modify the Tw2other directory and the directory under the cookie folder has writable permissions, or it may also be the same as information repeated synchronization, resulting in the brush screen! That is, the Tw2other folder and the Cookies folder under the Tw2other folder use the FTP tool to modify the properties to 777.

Log into the background of your C panel space and choose Cron jobs

?

?

After entering, select Standard level to

?

?

Here is the interface for setting up cron job

?

?

The top of the interface is the mailbox, you can set up a mailbox, cron job every time it runs, it will send an email to your mailbox, it is recommended to start setting the time to choose, so that you can see whether cron job is running correctly, if it runs correctly, you can delete the mailbox, otherwise, if you set the cron If the job interval is short, those spam messages will annoy you. The next way to close is also very simple, is to delete the mailbox is left blank, and then save it

The following command line is the one you want to fill out the Run command, beginning to fill in the location of the PHP interpreter, if you are using cpanel so generally located in/usr/local/bin/php, followed by filling in the location of your uploaded cron.php.

The entire command is as follows:

?

?

/usr/local/bin/php/home/your account name/public_html/tw2other/cron.php
?

?

The last is to set the specific time interval of cron job running, you can set to run every minute, or other time interval, but it is recommended that if you use free space, it is best to set the time interval longer, such as running every 5 minutes, Because I used a free space cron set to run every minute, causing the server to consume too much resources, causing the account to be deactivated.

?

After the above steps are set up, save.

?

4) Problems with synchronization

?

After the above steps have been set, I tested, but found that synchronization is not successful, ordinarily, I did not operate the error AH?

Login cpanel Space background View error log

?

?

An error message was found:

[Fri Mar 26 10:58:02 2010] [ERROR] [Client 74.81.64.34] File does not exist:/home/qiankun/public_html/500.shtml
[Fri Mar 26 10:58:02 2010] [ERROR] [Client 74.81.64.34] Softexception in Application.cpp:256:file "/home/qiankun/public_html/tw2other/index.php" are writeable by group

The original is index.php can write Ah! Recall the process of my operation, suddenly remember, when I set Tw2other folder permissions, the folder under the sub-files are set 777 (can read and write), to correct is also very simple, the index.php set to 755 on the line

?

?

Then test again:

Post a message on the Twitter homepage:

?

?

Wait a moment to view Sina Weibo and NetEase Weibo

Sina meager: Successful synchronization!

?

?

NetEase Weibo: Successful synchronization!

?

?

Note: If syncing to multiple tweets is enabled, please do not set up syncing between these tweets, or it will be synchronized with the information loop. When upgrading the version, please directly overwrite, do not delete the previous directory of the Tweet.id file (very important), will lead to repeated synchronization of the unfortunate things happen.

?

?

2.twitter2weibo

?

This script can only automatically sync Twitter updates to Sina Weibo

?

Author: iamsure
Author's homepage: http://iamsure.org

Download Address: twitter2weibo.php

?

File only a single file twitter2weibo.php, open with the editing tools, fill in your Twitter username and password, Sina Weibo user name and password;

?

?

Then in the host root directory public_html new Weibo folder, set the permissions to 777;
Upload the file to the folder;


Establish cron, set the time interval, and then set the Run command (see above):

?

/usr/local/bin/php ?/home/your user name/public_html/weibo/twitter2weibo.php

?

?

3.wordpress

?

Plugin Name: WordPress Connect Weibo

Plug-in Author: Water Vein Smoke Incense

Author's homepage: http://www.smyx.net/

Plugin page: http://www.smyx.net/wp-connect.html

Plugin Description: Support the use of 16 affiliate website account Login WordPress blog, and support to synchronize the title of the article and link to the 14 big microblogging and community.

Latest Version: 2.1.3

Support version: Minimum V3.0, has been updated to WordPress 3.3.1

Download Address: http://wordpress.org/extend/plugins/wp-connect/

?

?

?

?

?

See:

http://code.google.com/p/tw2ohter/

Cuies ' s Blog

Rookie notes ? use PHP space cron to synchronize Twitter to Sina, NetEase and other Weibo | Universe blog

http://www.fbair.net/bbs/read.php?tid=310

?

?

?

?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.