NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > CODE
Reload this Page Attention ICQ Users (User Status Script)

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
6 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 08-31-2005, 08:44 PM THREAD STARTER               #1 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,803
stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of
 



Attention ICQ Users (User Status Script)


Hello Again Fellow NamePros Members!
Just wanted to share my modification of something I found online, an ICQ status indicator. You can put this on your site, to let your users know if you are available to chat through ICQ.
????: NamePros.com http://www.namepros.com/code/120036-attention-icq-users-user-status-script.html

The code is below:

PHP Code:
<?php
$myuin 
"197829943";
$otheruin "22554411";
function 
GetICQ($uin) {
   if (!
is_numeric($uin)) return FALSE;

   
$fp fsockopen('status.icq.com'80, &$errno, &$errstr8);
   if (!
$fp) {
   return 
"N/A";
       }
   else {

   
$request "HEAD /online.gif?icq=$uin HTTP/1.0\r\n"
             
."Host: web.icq.com\r\n"
????: NamePros.com http://www.namepros.com/showthread.php?t=120036
             
."Connection: close\r\n\r\n";
   
fputs($fp$request);

   do {
       
$response fgets($fp1024);
   }
   while (!
feof($fp) && !stristr($response'Location'));

   
fclose($fp);

   if (
strstr($response'online1')) return 'Online';
   if (
strstr($response'online0')) return 'Offline';
   if (
strstr($response'online2')) return 'N/A';
   
// N/A means, this User set the Option, his Online
   // Status cannot be shown over the Internet
  
   
return FALSE;
   }
}

echo 
GetICQ($myuin);
echo 
GetICQ($otheruin);
?>
If you appreciate my contribution, please post rep, donate NP$, or both

More stuff on the Way, only from stscac

-Steve
stscac is offline  
Old 08-31-2005, 08:46 PM   #2 (permalink)
Account Suspended
 
vip-ip's Avatar
Join Date: Jan 2005
Location: root@localhost
Posts: 4,011
vip-ip is an unknown quantity at this point
 



Why do you need a myuin and otheruin? And is it possible to make an online form such as "Enter a UIN and get its' status"?
vip-ip is offline  
Old 08-31-2005, 08:58 PM THREAD STARTER               #3 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
Join Date: Aug 2004
Posts: 3,803
stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of
 



ok everyone, here is the requested, new and improved updated edition...
????: NamePros.com http://www.namepros.com/showthread.php?t=120036

PHP Code:
<?php

if (isset($_POST['submit'])) {
function 
GetICQ($uin) {
   if (!
is_numeric($uin)) return FALSE;

   
$fp fsockopen('status.icq.com'80, &$errno, &$errstr8);
   if (!
$fp) {
   return 
"N/A";
       }
   else {

   
$request "HEAD /online.gif?icq=$uin HTTP/1.0\r\n"
             
."Host: web.icq.com\r\n"
????: NamePros.com http://www.namepros.com/showthread.php?t=120036
             
."Connection: close\r\n\r\n";
   
fputs($fp$request);

   do {
       
$response fgets($fp1024);
   }
   while (!
feof($fp) && !stristr($response'Location'));

   
fclose($fp);

   if (
strstr($response'online1')) return 'Online';
   if (
strstr($response'online0')) return 'Offline';
   if (
strstr($response'online2')) return 'N/A';
   
// N/A means, this User set the Option, his Online
   // Status cannot be shown over the Internet
  
   
return FALSE;
   }
}

echo 
GetICQ($icqnum);
} else {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Is Your ICQ Friend Online? - Provided by STSCAC of NamePros (www.stscac.com)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="250" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><p><b>Are your ICQ friends Online?</b></p>
      <form action="icq.php" method="post"><p>ICQ Number:<br>
        <input type="text" name="icqnum">
  <input type="hidden" name="submit">
        <input type="submit" name="Submit" value="Submit"></form>
    </td>
  </tr>
</table>
</body>
</html>
<?}?>
Features support as a form (as requested).

Any additional mods can be done by me. As always, rep is always appreciated.

Enjoy!

-Steve
Last edited by stscac; 08-31-2005 at 09:28 PM.
stscac is offline  
Old 09-01-2005, 04:45 AM   #4 (permalink)
Account Suspended
 
vip-ip's Avatar
Join Date: Jan 2005
Location: root@localhost
Posts: 4,011
vip-ip is an unknown quantity at this point
 



Awesome!!! I used to be in the UIN speculation business untill I found domains more profitable
vip-ip is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Domain Rating Script for Sale : $200.00 - only 10 scripts will be sold fonzerelli_79 Scripts For Sale 3 08-31-2003 08:41 AM

 
All times are GMT -7. The time now is 02:09 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger