Jump to content

janinexd

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by janinexd

  1. Heres a simple twitter script, just update the username and password with your user/password for twitter

     

    
    function postToTwitter($message, $username = "mrwoot", $password="123456"){
    
        $host = "http://twitter.com/statuses/update.xml?status=".urlencode(stripslashes(urldecode($message)));
    
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $host);
        curl_setopt($ch, CURLOPT_VERBOSE, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
        curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
        curl_setopt($ch, CURLOPT_POST, 1);
    
        $result = curl_exec($ch);
        // Look at the returned header
        $resultArray = curl_getinfo($ch);
    
        curl_close($ch);
    
    }
    
    

     

    then you can just use

     

    
    postToTwitter("hello world");
    
    

     

    to post to twitter :) I'm using it for my ASPC processing twitter account

     

    http://twitter.com/aspcprocessing

     

    bare in mind there isnt any error checking on this simple script.

     

    thanks for this :D

  2. When posting sites to critique, double check your links please (assuming it's .com):

     

    http://www.janinexd.com

     

    Sorry about this, i think i was in a hurry when i post that XD

     

    The color schemes is more childish to me than professional. I know this is quite a heavy statement, but it's a little bit of a turn off. Maybe you can eliminate the rainbow, and make your name a professional logo?

     

    * noted, thank you :D

     

    Here are my thoughts:

     

    - The visuals do look nice, clean and professional. The layout is easy to understand, with plenty of breathing room. However, I don't like how the header is wider than the body of the site though (breaks alignment imo.. wouldn't be so bad if the header graphic went from screen edge to edge.. but given the width of 1400px, it sits there cropped off on higher resolution monitors).

     

    - Typically, most headers (or portions of them) act as image hyperlinks that when clicked, jump to the home page. I would consider making the 'JanineXD' part such a link (and I agree with FilmG.. Perhaps a more professional looking logo or something).

     

    - When viewing source code, I noticed that you have some embedded your css.. why not make this as a small separate css file? (liekwise with your javascripting.. making it a separate file enables better maintenance should it require some down the road).

     

    - You don't appear to have any SEO (aside from perhaps the title tage). So this means you make no use of heading tags (h1, h2, etc..), no meta description tag, etc.. I would recommend looking into integrating some SEO into your pages.

     

    - Examining the site using Yslow for Firebug in Firefox, seems like there's room for additional optmizations to be had (just images alone can shed over 45k via Yslow's smush.it! tool for example). I would recommend dowloading this tool and checking your site for ways to imrpove it. You can also read Yahoo's best practices as well.

     

    - I would probably include some form of copyright info into the footer (perhaps below the built in form).

     

    Overall, pretty well done (though it does feel 'template-ish'). Clean and serves its purpose well I suppose.

     

    Wow. very nice review, thank you so much for the detailed review.

     

    I will take note of this.

     

     

    To all,

     

    thank you so much for the detailed reviews, i really appreciate it. and i will take note of your comments. :)

  3. I know php but i cant seem to write correctly the functions. :s

    try http://www.oaxd.com

     

    the authentication thing works but i want it when authenticated to have a text area and a post_tweet function. i hope you understand what i mean. im a noob at this.

     

    tell me how much you need by working on this

    ------------------

    more info about the script

    This script allows you to let your user login using their existing Twitter account to your site, with some simple code, you can allow a login to your site using Twitter.

     

    In addition to this, the script offers a simple fuction ‘post_tweet()’ to simply post an update through a twitter account.

     

    As well as enabling you to post tweets, and authenticate users, when a user is logged in, the script will provide you with information about their user. Such as:

    - Screen Name

    - Real Name

    - Picture/ Avatar

    - Followers

     

    Unlike other Twitter OAuth scripts, this one also generates the required unique URL ’s for each user, so you don’t have to do any additional requests.

     

    This script is quite hard to demo, but i’ve included a small demo of how the login process is, and an example of the data you can access.

     

    here's what it says on the read me:

    Step 1: Upload

    //

     

    Upload the 'twitter' directory to your server, you can name the folder anything you wish.

     

     

     

    //

    Step 2: Config

    //

     

    Follow the instructions in the 'config.php' file on how to obtain access tokens from Twitter. You will only need to do this once, it's a method of authenticating your application/ script with Twitter.

     

     

    //

    Step 3: Test

    //

     

    We've included the file 'mytest.php' with your download. This allows you to test that everything is working okay, if you've followed the last two steps correctly then the 'mytest.php' file should run. When you're logged out of twitter, it displays the Login URL, use this to login to Twitter. Once completed, you should return to that page, if everything is working, insead of a 'login' link, you should see an array of data about the logged in user, similar to the following one:

     

    Array

    (

        [username] => the_dream

        [picture] => http://s3.amazon...

        [authenticated] => 1

        [followers] => 671

        [name] => Christian Owens

        [login] => n/a

    )

     

     

    //

    USAGE

    //

     

    Basically, to use the script, you're going to need to include the following file:

    twitter/twitter.php

     

    To check if a user is authenticated, check the variable $twitter['authenticated'] if the user is authenticated, this variable will return a 1, if not, a 0. This script does contain some loose user session control, but this script is meant to be used as a means for you to be able to create your own applications, so you can use this data to create a login system.

     

    If the user is not logged in, a login link is provided using the variable $twitter['login'] this link is the OAuth link, it is specifically generated for that user.

     

    Once a user is logged in, you can find out the following information about them using the following variables...

    Screen Name: $twtter['username']

    Avatar/Picture: $twitter['picture']

    Follower Count: $twitter['followers']

    Real Name: $twitter['name']

     

    If you then want to send a tweet through an authenticated users account, you can use the function post_tweet() in the following format:

     

    post_tweet("The message to be posted here!");

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.