Tuesday, 3 March 2015

Get Twitter Follower list with out using cursor

Hii sometime is problem to get all twitter follower list via single code using cursor , as u can get error "rate limit has been exceeded"

i got into this problem so i figured out solution hope this might help you ,


put any question if u have confusion:

Index.php


<?php
ini_set('max_execution_time', 6000);
ini_set('memory_limit', '1024M');
ini_set('display_errors', 0);
error_reporting(0);

require_once('TwitterAPIExchange.php');

$settings = array(
    'oauth_access_token' => "",
    'oauth_access_token_secret' => "",
    'consumer_key' => "",
    'consumer_secret' => ""
);
$requestMethod = 'GET';
$url1="https://api.twitter.com/1.1/followers/ids.json";
$url2="https://api.twitter.com/1.1/users/lookup.json";
$sc_name = 'screenamehere';

$cursor = -1;
$profiles = array();



        $getfield = '?screen_name=rocdamicforever&cursor='.$cursor;

       
$twitter = new TwitterAPIExchange($settings);
$ids  = $twitter->setGetfield($getfield)->buildOauth($url1, $requestMethod)->performRequest();

$twitter_ids = json_decode($ids);
$allids = $twitter_ids->{'ids'};
        if(!is_array($allids)) break;
        $ids_arrays = array_chunk($allids, 100);

$k = 0;
        foreach($ids_arrays as $implode) {
            $user_ids=implode(',', $implode);
$getfield2 = '?user_id='.$user_ids; 
            $results = $twitter->setGetfield($getfield2)->buildOauth($url2, $requestMethod)->performRequest();

$finalresul = json_decode($results);



            foreach($finalresul as $profile) {
$k++;
echo "<pre>";
//print_r($profile);
echo $profile->id.' '.$profile->name.' '.$profile->screen_name;
echo "</pre>";
echo '-------------------------------------<br>';
            }
        }

echo "Toatal Records ".$k;

TwitterAPIExchange.php (basically this file has been taken from github ) 

https://github.com/J7mbo/twitter-api-php/

Now what am i doing:

1: I first of all take all follower list from user screen name : url 1 (you can find it here 5000 at once)
2: then i use look up to get detail about list ids url2 (you can get detail about 100 ids in single request)


Friday, 6 September 2013

play videos flash from androi html:

play videos flash from androi html:


        super.init();

        super.appView.getSettings().setPluginsEnabled(true);

example:


    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        super.init();
        super.appView.getSettings().setPluginsEnabled(true);
        // Set by <content src="index.html" /> in config.xml
        super.loadUrl(Config.getStartUrl());
        //super.loadUrl("file:///android_asset/www/index.html")
    }

Thursday, 4 April 2013

android pdf from sd card


File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/test.pdf");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file),"application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(intent);

Friday, 11 January 2013

Monday, 17 September 2012

Wednesday, 15 August 2012

Vodafone Tricks

odafone Free GPRS Working Trick-July 2012
1. Connection Name---Vodafone Gprs
2. Set Apn Address--vodafone
3. Proxy Address--197.784.47.77
4. Proy Port--80
5. Home Page--www.google.com

Now just save the settings and restart mobile phone and surf free Vodafone free gprs trick.That's all for now for more vodafone hack tricks 2012 stay tuned with AllTricksZone.in