Тема: curl
Показать сообщение отдельно

curl
  #1  
Старый 28.04.2010, 00:57
IgrikX
Познающий
Регистрация: 13.08.2009
Сообщений: 92
С нами: 8812922

Репутация: 1
По умолчанию curl

PHP код:
 CURL *curl;
  
UnicodeString table;
  
CURLcode result;
  
AnsiString exp="(id='s' value='(.*)')";// регулярка
  
curl = curl_easy_init();
  if(
curl) {
  
curl_easy_setopt(curl, CURLOPT_USERAGENT,"Mozilla/5.0 (Windows; U; Windows NT 5.1;en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1");
  
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,Writer);
  
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
  
curl_easy_setopt(curl, CURLOPT_WRITEDATA,&table);
  
curl_easy_setopt(curl, CURLOPT_POST, true);
  
curl_easy_setopt(curl, CURLOPT_URL,"http://login.vk.com/?act=login");
  
curl_easy_setopt(curl, CURLOPT_HEADER, 0);
  
curl_easy_setopt(curl, CURLOPT_NOBODY, 1);
  
curl_easy_setopt(curl, CURLOPT_HTTPPOST, 1);
  
curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookie.txt");
  
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "cookie.txt");
  
curl_easy_setopt(curl, CURLOPT_REFERER, "http://vkontakte.ru/index.php");
  
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "email=XXXXX@mail.ru&pass=XXXXX&expire=&vk=");
  
result = curl_easy_perform(curl);

  
Memo1->Text = table;
  
curl_easy_cleanup(curl); 
Почему выводит мало html тэгов, нет там тэгов ссылок?
 
Ответить с цитированием