witam,
google przewałkowałem kompletnie wszerz i wzdłuż, tutejsze forum także i choć znalazłem kilka podobnych tematów nie mogę uporać się z problemem
chciałbym zaimplementować funkcję do zalogowania się na pewnej stronie i wysłanie formularzem zapytania do wygenerowania linku/linków oraz pobraniem ich z powrotem (czyli oczywiście cURL)

pominę logowanie na stronę bo z tym problemu nie ma, kod wygląda następująco


  1. curl_setopt($c, CURLOPT_URL, 'http://www.linksnappy.com/index.php?act=download');
  2. curl_setopt($c, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
  3. curl_setopt($c, CURLOPT_POST, 1);
  4. curl_setopt($c, CURLOPT_POSTFIELDS, 'xjxfun=makeLinks&xjxr=1321872093&xjxargs[]='.$link.'&xjxargs[]=wupload.com&xjxargs[]=S');
  5. curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
  6. curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
  7. curl_setopt ($c, CURLOPT_COOKIEJAR, '/tmp/cookie.txt');
  8. curl_setopt ($c, CURLOPT_COOKIEFILE, '/tmp/cookie.txt');



część skryptu przekazująca dane:
  1. <script type="text/javascript" charset="UTF-8">
  2. /* <![CDATA[ */
  3. try { if (undefined == xajax.config) xajax.config = {}; } catch (e) { xajax = {}; xajax.config = {}; };
  4. xajax.config.requestURI = "http://www.linksnappy.com/index.php?act=download";
  5. xajax.config.statusMessages = false;
  6. xajax.config.waitCursor = true;
  7. xajax.config.version = "xajax 0.5";
  8. xajax.config.legacy = false;
  9. xajax.config.defaultMode = "asynchronous";
  10. xajax.config.defaultMethod = "POST";
  11. /* ]]> */
  12. </script>
  13. <script type="text/javascript" src="/includes/libs/xajax_js/xajax_core.js" charset="UTF-8"></script>
  14. <script type="text/javascript" charset="UTF-8">
  15. /* <![CDATA[ */
  16. window.setTimeout(
  17. function() {
  18. var scriptExists = false;
  19. try { if (xajax.isLoaded) scriptExists = true; }
  20. catch (e) {}
  21. if (!scriptExists) {
  22. alert("Error: the xajax Javascript component could not be included. Perhaps the URL is incorrect?\nURL: /includes/libs/xajax_js/xajax_core.js");
  23. }
  24. }, 2000);
  25. /* ]]> */
  26. </script>
  27.  
  28. <script type='text/javascript' charset='UTF-8'>
  29. /* <![CDATA[ */
  30. xajax_validate = function() { return xajax.request( { xjxfun: 'validate' }, { parameters: arguments } ); };
  31. xajax_makeLinks = function() { return xajax.request( { xjxfun: 'makeLinks' }, { parameters: arguments } ); };
  32. /* ]]> */
  33. </script>
  34.  
  35. <script type="text/javascript" charset="UTF-8">
  36. /* <![CDATA[ */
  37. xajax_LSP = {};
  38. xajax_LSP.getConfig = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'getConfig' }, { parameters: arguments } ); };
  39. xajax_LSP.getResellers = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'getResellers' }, { parameters: arguments } ); };
  40. xajax_LSP.CountryName = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'CountryName' }, { parameters: arguments } ); };
  41. xajax_LSP.can_download = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'can_download' }, { parameters: arguments } ); };
  42. xajax_LSP.insert_users = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'insert_users' }, { parameters: arguments } ); };
  43. xajax_LSP.GenerateUserDetails = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'GenerateUserDetails' }, { parameters: arguments } ); };
  44. xajax_LSP.makeList = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'makeList' }, { parameters: arguments } ); };
  45. xajax_LSP.sellAccs = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'sellAccs' }, { parameters: arguments } ); };
  46. xajax_LSP.genAccs = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'genAccs' }, { parameters: arguments } ); };
  47. xajax_LSP.showLinks = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'showLinks' }, { parameters: arguments } ); };
  48. xajax_LSP.RefStats = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'RefStats' }, { parameters: arguments } ); };
  49. xajax_LSP.filterAccs = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'filterAccs' }, { parameters: arguments } ); };
  50. xajax_LSP.setPackage = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'setPackage' }, { parameters: arguments } ); };
  51. xajax_LSP.updateExpireDate = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'updateExpireDate' }, { parameters: arguments } ); };
  52. xajax_LSP.Error = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'Error' }, { parameters: arguments } ); };
  53. xajax_LSP.escape = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'escape' }, { parameters: arguments } ); };
  54. xajax_LSP.displayTemplates = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'displayTemplates' }, { parameters: arguments } ); };
  55. xajax_LSP.packages = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'packages' }, { parameters: arguments } ); };
  56. xajax_LSP.updateUserlevel = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'updateUserlevel' }, { parameters: arguments } ); };
  57. xajax_LSP.setExpireDate = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'setExpireDate' }, { parameters: arguments } ); };
  58. xajax_LSP.makeExpireDate = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'makeExpireDate' }, { parameters: arguments } ); };
  59. xajax_LSP.expiresIn = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'expiresIn' }, { parameters: arguments } ); };
  60. xajax_LSP.random = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'random' }, { parameters: arguments } ); };
  61. xajax_LSP.is_home = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'is_home' }, { parameters: arguments } ); };
  62. xajax_LSP.is_script = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'is_script' }, { parameters: arguments } ); };
  63. xajax_LSP.getPlugins = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'getPlugins' }, { parameters: arguments } ); };
  64. xajax_LSP.Server = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'Server' }, { parameters: arguments } ); };
  65. xajax_LSP.getInstance = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'getInstance' }, { parameters: arguments } ); };
  66. xajax_LSP.query = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'query' }, { parameters: arguments } ); };
  67. xajax_LSP.fetch = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'fetch' }, { parameters: arguments } ); };
  68. xajax_LSP.num_rows = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'num_rows' }, { parameters: arguments } ); };
  69. xajax_LSP.CloseConn = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'CloseConn' }, { parameters: arguments } ); };
  70. /* ]]> */
  71. </script>


a tak wygląda javascript do którego wysyłane są dane:
http://linksnappy.com/includes/libs/xajax_js/xajax_core.js



proszę jakieś sokole oko o pomoc, co mogłem pominąć?