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
curl_setopt($c, CURLOPT_URL, 'http://www.linksnappy.com/index.php?act=download');
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');
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, 'xjxfun=makeLinks&xjxr=1321872093&xjxargs[]='.$link.'&xjxargs[]=wupload.com&xjxargs[]=S');
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
curl_setopt ($c, CURLOPT_COOKIEJAR, '/tmp/cookie.txt');
curl_setopt ($c, CURLOPT_COOKIEFILE, '/tmp/cookie.txt');
część skryptu przekazująca dane:
<script type="text/javascript" charset="UTF-8">
/* <![CDATA[ */
try { if (undefined == xajax.config) xajax.config = {}; } catch (e) { xajax = {}; xajax.config = {}; };
xajax.config.requestURI = "http://www.linksnappy.com/index.php?act=download";
xajax.config.statusMessages = false;
xajax.config.waitCursor = true;
xajax.config.version = "xajax 0.5";
xajax.config.legacy = false;
xajax.config.defaultMode = "asynchronous";
xajax.config.defaultMethod = "POST";
/* ]]> */
</script>
<script type="text/javascript" src="/includes/libs/xajax_js/xajax_core.js" charset="UTF-8"></script>
<script type="text/javascript" charset="UTF-8">
/* <![CDATA[ */
window.setTimeout(
function() {
var scriptExists = false;
try { if (xajax.isLoaded) scriptExists = true; }
catch (e) {}
if (!scriptExists) {
alert("Error: the xajax Javascript component could not be included. Perhaps the URL is incorrect?\nURL: /includes/libs/xajax_js/xajax_core.js");
}
}, 2000);
/* ]]> */
</script>
<script type='text/javascript' charset='UTF-8'>
/* <![CDATA[ */
xajax_validate = function() { return xajax.request( { xjxfun: 'validate' }, { parameters: arguments } ); };
xajax_makeLinks = function() { return xajax.request( { xjxfun: 'makeLinks' }, { parameters: arguments } ); };
/* ]]> */
</script>
<script type="text/javascript" charset="UTF-8">
/* <![CDATA[ */
xajax_LSP = {};
xajax_LSP.getConfig = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'getConfig' }, { parameters: arguments } ); };
xajax_LSP.getResellers = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'getResellers' }, { parameters: arguments } ); };
xajax_LSP.CountryName = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'CountryName' }, { parameters: arguments } ); };
xajax_LSP.can_download = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'can_download' }, { parameters: arguments } ); };
xajax_LSP.insert_users = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'insert_users' }, { parameters: arguments } ); };
xajax_LSP.GenerateUserDetails = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'GenerateUserDetails' }, { parameters: arguments } ); };
xajax_LSP.makeList = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'makeList' }, { parameters: arguments } ); };
xajax_LSP.sellAccs = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'sellAccs' }, { parameters: arguments } ); };
xajax_LSP.genAccs = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'genAccs' }, { parameters: arguments } ); };
xajax_LSP.showLinks = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'showLinks' }, { parameters: arguments } ); };
xajax_LSP.RefStats = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'RefStats' }, { parameters: arguments } ); };
xajax_LSP.filterAccs = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'filterAccs' }, { parameters: arguments } ); };
xajax_LSP.setPackage = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'setPackage' }, { parameters: arguments } ); };
xajax_LSP.updateExpireDate = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'updateExpireDate' }, { parameters: arguments } ); };
xajax_LSP.Error = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'Error' }, { parameters: arguments } ); };
xajax_LSP.escape = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'escape' }, { parameters: arguments } ); };
xajax_LSP.displayTemplates = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'displayTemplates' }, { parameters: arguments } ); };
xajax_LSP.packages = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'packages' }, { parameters: arguments } ); };
xajax_LSP.updateUserlevel = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'updateUserlevel' }, { parameters: arguments } ); };
xajax_LSP.setExpireDate = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'setExpireDate' }, { parameters: arguments } ); };
xajax_LSP.makeExpireDate = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'makeExpireDate' }, { parameters: arguments } ); };
xajax_LSP.expiresIn = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'expiresIn' }, { parameters: arguments } ); };
xajax_LSP.random = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'random' }, { parameters: arguments } ); };
xajax_LSP.is_home = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'is_home' }, { parameters: arguments } ); };
xajax_LSP.is_script = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'is_script' }, { parameters: arguments } ); };
xajax_LSP.getPlugins = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'getPlugins' }, { parameters: arguments } ); };
xajax_LSP.Server = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'Server' }, { parameters: arguments } ); };
xajax_LSP.getInstance = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'getInstance' }, { parameters: arguments } ); };
xajax_LSP.query = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'query' }, { parameters: arguments } ); };
xajax_LSP.fetch = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'fetch' }, { parameters: arguments } ); };
xajax_LSP.num_rows = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'num_rows' }, { parameters: arguments } ); };
xajax_LSP.CloseConn = function() { return xajax.request( { xjxcls: 'LSP', xjxmthd: 'CloseConn' }, { parameters: arguments } ); };
/* ]]> */
</script>
a tak wygląda javascript do którego wysyłane są dane:
http://linksnappy.com/includes/libs/xajax_js/xajax_core.jsproszę jakieś sokole oko o pomoc, co mogłem pominąć?