ANTICHAT

ANTICHAT (https://forum.antichat.io/index.php)
-   С/С++, C#, Rust, Swift, Go, Java, Perl, Ruby (https://forum.antichat.io/forumdisplay.php?f=24)
-   -   curl (https://forum.antichat.io/showthread.php?t=199925)

IgrikX 28.04.2010 00:57

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 тэгов, нет там тэгов ссылок?


Время: 15:19