Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8017895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:58:21+00:00 2026-06-04T20:58:21+00:00

I have an application ive built that users can register and link their twitter

  • 0

I have an application ive built that users can register and link their twitter account.

If somebody creates a user for spam purposes however Twitter then deletes this user, they still stay on my site however. If another user then tries to follow them I bounce back a message saying user is no longer valid only this has become a serious problem and there’s a lot of spam accounts.

My current solution is when the page loads, with jQuery check to see if the twitter users image loads and if not set that user to display none.

Im wondering however, is there a way to check BEFORE outputting my page, so this way my users arent presented with a list of users, that when the page loads X of them dissapear, but a list of users who are all active?

Thanks


This is the php I have on my page, I know its old but is there a way to check if the user exists with Twitter and mix it with what I currently have?

Sorry im very new to PHP!

$rs = mysql_query("select produgg_users.id, twitterUser, coff, credits from produgg_users where twitterUser != '' and active !='' and credits >= coff and  
                produgg_users.id IN (select concat_ws(',', id) from produgg_users where credits > 0 and id != ".$usersClass->userID().") and produgg_users.id NOT IN (select concat_ws(',', followedID) from produgg_activity where followerID = '".$usersClass->userID()."') and produgg_users.id NOT IN (select concat_ws(',', userid) from produgg_featured) ORDER BY coff DESC LIMIT 30;") or die(mysql_error());    

$nr = @mysql_num_rows($rs);

if($nr != 0) {
    print "<h2>More Friendr Users!</h2><div>";

    while($row=@mysql_fetch_object($rs))
    {
        $divLeft = '<div class="user-box" id="thediv_'.$row->id.'"><div class="twithandlepic"><img src="http://api.twitter.com/1/users/profile_image/';
        $divRight = '<div class="twithandle">';
        $clearDiv = '<div style="clear:both;"></div>';
        $row->coff = $row->coff - 1;


    print $divLeft.strip_tags($row->twitterUser)."?size=bigger\" style=\"width:73px; height:73px;\"/><br \/>".$row->twitterUser.$divRight."<a href='javascript:void(0);'   id='vote_$row->id' class='getPoint'>Get $row->coff <input type='hidden' value='$row->coff' class='credoff' name='credoff'/> credit(s)</a><br /></div>$clearDiv</div></div>"; 


} print "</div>";

echo " <a href='earn-credits.php' class='refreshlist'>Refresh</a>";

}else{

    print "<p>No twitter users to show</p>";    
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:58:23+00:00Added an answer on June 4, 2026 at 8:58 pm

    You can just send a request to twitter.com/username and look at the response code: 200 if the user exists, 404 if they don’t. For example, try http://twitter.com/somefakeperson and you’ll get a 404.

    Using CURL it’d look something like this:

       while($row=@mysql_fetch_object($rs)) 
        {
          $ch = curl_init('http://twitter.com/'.$row->twitterUser);
          curl_exec($ch);
    
          if(!curl_errno($ch))
          {
           $info = curl_getinfo($ch);
           if($info['http_code'] == '200') {
            $divLeft = '<div class="user-box" id="thediv_'.$row->id.'"><div class="twithandlepic"><img src="http://api.twitter.com/1/users/profile_image/';
            $divRight = '<div class="twithandle">';
            $clearDiv = '<div style="clear:both;"></div>';
            $row->coff = $row->coff - 1;
    
    
            print $divLeft.strip_tags($row->twitterUser)."?size=bigger\" style=\"width:73px; height:73px;\"/><br \/>".$row->twitterUser.$divRight."<a href='javascript:void(0);'   id='vote_$row->id' class='getPoint'>Get $row->coff <input type='hidden' value='$row->coff' class='credoff' name='credoff'/> credit(s)</a><br /></div>$clearDiv</div></div>"; 
    
    
           }
         }
         curl_close($ch);
       }
    

    As an aside, it might also be good to send an update back to the DB any time you hit an invalid user to either remove or flag the user somehow. You could then filter out those users in the future right at the DB level.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application where my users can have a set of preferences. Both
Part 1 I want to build a PHP Zend Framework application that users can
I have been tasked with building an application where an end user can have
I have built a .dll under WinXP that claims it can't find DWMAPI.DLL when
I have a call tracking application that I've built and now I need to
I've built a Silverlight website where users can create an account and login. Right
I have an application that uses WPF Composite, and I have an issue. I've
I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon. Even if I've
I've creating a Java Swing application and I realized that I have many many
I have a web application on ASP.NET (C#) that has some precompiled components. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.