• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Hướng dẫn thêm nick và gửi tin nhắn yahoo online bằng php

Admin

Well-Known Member
Staff member
Administrator
Đầu tiên là function
Tạo tập tin function.php dán code này vào
PHP:
<?
@set_time_limit(0);
$browser_agent = "Thay bằng user agent bạn muốn";
$cookie_file='ymsg.cookie';
$f=fopen($cookie_file,'wb');
fclose($f);
function curlGet($url, $follow_location=false, $return_last_url=false)
{
global $browser_agent,$cookie_file;
$ch=curl_init();
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
if ($follow_location)
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($ch, CURLOPT_USERAGENT, $browser_agent);
curl_setopt($ch, CURLOPT_URL, $url);
$result=curl_exec($ch);
$last_url=curl_getinfo($ch,CURLINFO_EFFECTIVE_URL);
curl_close($ch);
if ($return_last_url)
return $last_url;
else
return $result;
}

function curlPost($url, $post_data=array(), $follow_location=false, $return_last_url=false, $ssl=false)
{
global $browser_agent,$cookie_file;
$ch=curl_init();
if ($ssl)
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
if ($follow_location)
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($ch, CURLOPT_USERAGENT, $browser_agent);
curl_setopt($ch, CURLOPT_URL, $url);
if (!empty($post_data))
{
$post_fields=http_build_query($post_data);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
}
$result=curl_exec($ch);
$last_url=curl_getinfo($ch,CURLINFO_EFFECTIVE_URL);
curl_close($ch);
if ($return_last_url)
return $last_url;
else
return $result;
}
?>
Sau đó tạo tập tin login.php dán code này vào
PHP:
<?
// lấy server đăng nhập
$bot=array(bristol,missouri,rome,lisbon,montana,taipei,verona,kentucky,nebraska,washington,sofia,vegas);
$rand=$bot[rand(0,11)];
$url_base='http://'.$rand.'.ebuddy.com/multi/mob';

// đăng xuất lần đăng nhập trước 
curlGet("{$url_base}/logout.vm",true);

// đăng nhập vào server
$post_data=array('network'=>'YAHOO','user'=>$_GET['id'],'password'=>$_GET['pwd'],'away'=>'HDN','login'=>'Sign+in');
$temp=curlPost($url_base.'/login.vm',$post_data,true);

// tìm jsessionid
$jsessionid=explode('jsessionid=',$temp);
$jsessionid=explode('"/><meta',$jsessionid[1]);

// Chuyển sang trang danh bạ
$url="{$url_base}/contacts.vm;jsessionid={$jsessionid[0]}";
$tester=curlGet($url,true);
while (strpos($tester,'Loading...Please wait.The login process may take up to 30 seconds.')!==false)
$tester=(curlGet($url,true));
?>
Tạo tiếp tập tin add.php dán code này vào
PHP:
<?
include 'function.php';
include 'login.php';

//Open Option
$op_url="{$url_base}/buddy.vm?action=add";
$op_url=curlGet($op_url,true);
$hash=explode('type="hidden" value="',$op_url);
$hash=explode('" />',$hash[1]);

// Add nick 
$add_url="{$url_base}/buddy.vm;jsessionid={$jsessionid[0]}";
$post_add=array(
'username'=>$_GET['yids'],
'hash'=>$hash[0],
'addcontact'=>'Add buddy'
);
$result=curlPost($add_url,$post_add,true);
if(strpos($result,'Contact already in buddy list'))
{
echo 'Contact already in buddy list';
exit;
}
else { echo 'Completed'; }
?>
Cuối cùng tạo tập tin send.php dán code này vào
PHP:
<?
include 'function.php';
include 'login.php';

//Open chat
$receiver?$receiver=$receiver:$receiver=$_GET['yids'];
$url="{$url_base}/chat.vm?user={$receiver}";
curlGet($url,true);

//Send first message
$url="{$url_base}/chat.vm;jsessionid={$jsessionid}";
$post_data=array(
'msg'=>'Test message :D',
'send'=>'Send',
'user'=>$receiver,
'hash'=>'',
'network'=>'YAHOO'
);
$result=curlPost($url,$post_data);
if(strpos($result,'Me'))
{
echo 'Sent complete';
} else {
echo 'Fail.Try Again!';
}

//Logout
curlGet("{$base_url}/logout.vm",true);
?>
Muốn thêm nick thì chạy link sau
Code:
http://mysite.com/add.php?id=nickyahoocuaban&pwd=passcuanick&yids=nickcanadd
Gửi tin nhắn đến 1 nick nào đó
Code:
http://mysite.com/send.php?id=nickyahoocuaban&pwd=passcuanick&yids=nickcangui
Chúc các bạn thành công!
 

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top