What's my HI5

Started on the old forum in February 2012 · view the original in the archive · old links redirect here

No replies · 1,872 views · started 14 years ago · 2 min read

kiss Senior · 294 posts #1

This code is created by me but it not necesary anymore, you must run it to a vps or dedicated:

$username = "" ;
 $password = "" ;
 function detecthi5( $yid ) {
  global $username, $password ;
  $ch = curl_init() ;
  curl_setopt( $ch, CURLOPT_URL, "http://hi5.com/friend/login.do" ) ;
  curl_setopt( $ch, CURLOPT_REFERER, "http://hi5.com/friend/displayHomePage.do" ) ;
  curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] ) ;
  //curl_setopt( $ch, CURLOPT_FRESH_CONNECT, 1 ) ; //optional
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ) ;
  curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ) ;
  curl_setopt( $ch, CURLOPT_POST, 1 ) ;
  curl_setopt( $ch, CURLOPT_POSTFIELDS, "/friend/processBrowseSearch.do?searchText=" . $yid . "&email=" . urlencode( $username ) . "&password=" . urlencode( $password ) . "&remember=on&type=1" ) ;
  //curl_setopt( $ch, CURLOPT_COOKIEFILE, "./txt/cookies.txt" ) ;
  //curl_setopt( $ch, CURLOPT_COOKIEJAR, "./txt/cookies.txt" ) ;
  $result = curl_exec( $ch ) ;
  if ( $result === false ) {
   return false ;
   //echo curl_errno($ch).':'.curl_error($ch);
  }
  $redirect = curl_getinfo( $ch, CURLINFO_EFFECTIVE_URL ) ;
  curl_close( $ch ) ;
  $logged = preg_match( '/LoggedinHome/', $redirect ) ;
  if ( ! $logged ) {
   return false ;
  }
  $ch = curl_init() ;
  curl_setopt( $ch, CURLOPT_URL, "http://hi5.com/friend/processBrowseSearch.do?searchText=" . $yid . "" ) ;
  curl_setopt( $ch, CURLOPT_REFERER, "http://hi5.com/friend/displayMyProfile.do" ) ;
  curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] ) ;
  //curl_setopt( $ch, CURLOPT_FRESH_CONNECT, 1 ) ;
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ) ;
  curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ) ;
  //curl_setopt( $ch, CURLOPT_COOKIEFILE, "./txt/cookies.txt" ) ;
  //curl_setopt( $ch, CURLOPT_COOKIEJAR, "./txt/cookies.txt" ) ;
  $result = curl_exec( $ch ) ;
  if ( $result === false ) {
   return false ;
   //echo curl_errno($ch).':'.curl_error($ch);
  }
  curl_close( $ch ) ;
  $id = string ( $result, 'photo-link" href="/friend/p', '--' ) ;
  $title = string ( $result, '/friend/p' . $id . '--', '--html">' ) ;
  $avatar = string ( $result, 'height="75" src="', '"' ) ;
  if ( $id ) {
   return "<table align=\"center\">
<tr>
<td>
<img src=\"" . $avatar . "\" width=\"60\" height=\"60\" class=\"avatar\" alt=\"" . $yid . "\"/>
</td>
<td>
" . str_replace( "_", " ", urldecode( $title ) ) . "
<br/>
[<a href=\"http://hi5.com/friend/mobile/photos/displayAlbum.do?ownerId=" . $id . "\">View Photos</a>]
[<a href=\"http://hi5.com/friend/mobile/friends/displayAddFriend.do?userid=" . $id . "\">Add Friend</a>]
[<a href=\"http://hi5.com/friend/mobile/mail/displayNewMessage.do?toIds=" . $id . "\">Send Private</a>]
</td>
</tr>
</table>" ;
  } else {
   return null ;
  }
 }
echo detecthi5("email@email.com"); // replace with any other email

www.inbuzunar.mobi -Your mobile portal pocket

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close