Mam taki formularz (wrzuciłem go na pasterbin.com):

http://pastebin.com/jj2dkUMP

Próbowałem połączyć się tak:
  1. $ch = curl_init('http://www.strona.com/index.php?act=download#dloadform');
  2. curl_setopt($ch, CURLOPT_HEADER, 1);
  3. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  4. curl_setopt($ch, CURLOPT_NOBODY, false);
  5. curl_setopt($ch, CURLOPT_POST, true);
  6. curl_setopt($ch, CURLOPT_POSTFIELDS, 'links=http://rapidshare.com/files/389251039/Perfect_-_Niewiele_Ci_Moge_Dac.mp3&downloadit=Generate Links');
  7. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  8. curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
  9. curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
  10. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12');
  11. $afterLogin = curl_exec($ch);
  12. echo $afterLogin;
  13. curl_close($ch);


Ale chyba coś nie wysyła danych...

Jak to zrobić?


Edit// Może to pomoże..?
  1. POST /index.php?act=download HTTP/1.1
  2. Host: strona.com
  3. Connection: keep-alive
  4. Referer: [url="http://stronay.com/index.php?act=download"]http://stronay.com/index.php?act=download[/url]
  5. Content-Length: 402
  6. Cache-Control: max-age=0
  7. Origin: [url="http://strona.com"]http://strona.com[/url]
  8. If-Modified-Since: Sat, 1 Jan 2000 00:00:00 GMT
  9. content-type: application/x-www-form-urlencoded
  10. Accept: */*
  11. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
  12. Accept-Encoding: gzip,deflate,sdch
  13. Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4
  14. Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.3
  15. Cookie: PHPSESSID=e458490805ec0ee9a78d1971d56dddca; lseSavePass=YToyOntzOjU6InVuYW1lIjtzOjY6IjExMTQxMyI7czo4OiJwYXNzd29yZCI7czo4OiJh
    UzQ1UkZzMiI7fQ%3D%3D
  16.  
  17. xjxfun=makeLinks&xjxr=1293632596645&xjxargs[]=%3Cxjxobj%3E%3Ce%3E%3Ck%3Elinks%3C%2Fk%3E%3Cv%3ES%3C!%5BCDATA%5Bhttp%3A%2F%2Frapidshare.com%2Ffiles%2F389251039%2FPerfect_-_Niewiele_Ci_Moge_Dac.mp3%5D%5D%3E%3C%2Fv%3E%3C%2Fe%3E%3Ce%3E%3Ck%3Edownloadit%3C%2Fk%3E%3Cv%3ES%3C!%5BCDATA%5BGenerate%20Links%5D%5D%3E%3C%2Fv%3E%3C%2Fe%3E%3Ce%3E%3Ck%3Ereset%3C%2Fk%3E%3Cv%3ESReset%3C%2Fv%3E%3C%2Fe%3E%3C%2Fxjxobj%3EPOST /index.php?act=download HTTP/1.1
  18. Host: strona.com
  19. Connection: keep-alive
  20. Content-Length: 199
  21. Cache-Control: max-age=0
  22. If-Modified-Since: Sat, 1 Jan 2000 00:00:00 GMT
  23. content-type: application/x-www-form-urlencoded
  24. Accept: */*
  25. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
  26. Accept-Encoding: gzip,deflate,sdch
  27. Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4
  28. Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.3
  29. Cookie: PHPSESSID=e458490805ec0ee9a78d1971d56dddca; lseSavePass=YToyOntzOjU6InVuYW1lIjtzOjY6IjExMTQxMyI7czo4OiJwYXNzd29yZCI7czo4OiJhUzQ1UkZzMiI7
    fQ%3D%3D
  30.  
  31. xjxfun=processLink&xjxr=1293632598135&xjxargs[]=S%3C!%5BCDATA%5Bhttp%3A%2F%2Frapidshare.com%2Ffiles%2F389251039%2FPerfect_-_Niewiele_Ci_Moge_Dac.mp3%5D%5D%3E&xjxargs[]=Srapidshare.com&xjxargs[]=Strue