i tired to know how to do that i wanna to know how to connect and login to another site with php .. ?
first, you need to be familiar with cURL.. Here's a helpful link: http://devzone.zend.com/article/1081
usually you have to do post request to the url of the login page a practical approch is 1- open the html page that you want to mimic and search for the login form 2- write down the form action url 3- note down the form fields and their names then do the following request in curl (this is command line version you have to translate it to php) curl -X POST -d "username=value1&password=value2" FORMACTIONURL
like everyone has said you need to know a bit of cURL to get it to work. one thing missing in previous replies is that you need to keep the cookies. as i'm guessing you want to loing in remotely in order to do things as a logged in user. it's not complicated, you just need to read the cookies that were created when logged in and keep them.
You'll need to use cURL, find the field names that are posted in order to login to the site, and write a cURL script which will post to the site with the field names along with saving the session cookies. Refer to: http://curl.haxx.se/mail/archive-2003-05/0038.html
Log on to the website you want to cURL using your own browser, export the cookies files and then load the cookies file with cURL like this: curl --cookie cookies.txt http://forums.digitalpoint.com