Warning: Cannot use a scalar value as an array in /home/admin/public_html/forum/include/fm.class.php on line 757

Warning: Invalid argument supplied for foreach() in /home/admin/public_html/forum/include/fm.class.php on line 770

Warning: Invalid argument supplied for foreach() in /home/admin/public_html/forum/topic.php on line 737
Форумы портала PHP.SU :: вопрос по cURL

 PHP.SU

Программирование на PHP, MySQL и другие веб-технологии
PHP.SU Портал     На главную страницу форума Главная     Помощь Помощь     Поиск Поиск     Поиск Яндекс Поиск Яндекс     Вакансии  Пользователи Пользователи


 Страниц (1): [1]   

> Без описания
algebra
Отправлено: 08 Сентября, 2011 - 10:14:06
Post Id



Частый гость


Покинул форум
Сообщений всего: 171
Дата рег-ции: Февр. 2011  


Помог: 0 раз(а)




В прошлый раз вы (в особенности OrmaJever) мне помогли здесь http://forum.php.su/topic.php?fo...0&topic=2325

Но теперь задача усложнилась:

curl('http://hippodrom.ru/modules/results/stavki.jq.php', 'race_id=2212'
работает взаимодействии с JQuery , а именно с функциями:
CODE (javascript):
скопировать код в буфер обмена
  1. function showResults() {
  2.                 // get the position of the input field right now (in case the DOM is shifted)
  3.                 var pos = findPos(input);
  4.                 // either use the specified width, or autocalculate based on form element
  5.                 var iWidth = (options.width > 0) ? options.width : $input.width();
  6.                 // reposition
  7.                 $results.css({
  8.                         width: parseInt(iWidth) + "px",
  9.                         top: (pos.y + input.offsetHeight) + "px",
  10.                         left: pos.x + "px"
  11.                 }).show();
  12.         };
  13.  
  14.         function hideResults() {
  15.                 if (timeout) clearTimeout(timeout);
  16.                 timeout = setTimeout(hideResultsNow, 200);
  17.         };
  18.  
  19.         function hideResultsNow() {
  20.                 if (timeout) clearTimeout(timeout);
  21.                 $input.removeClass(options.loadingClass);
  22.                 if ($results.is(":visible")) {
  23.                         $results.hide();
  24.                 }
  25.                 if (options.mustMatch) {
  26.                         var v = $input.val();
  27.                         if (v != input.lastSelected) {
  28.                                 selectItem(null);
  29.                         }
  30.                 }
  31.         };


Как обойти эти функции при запросе CURL, может есть возможность задать переменной константу, чтобы всегда срабатывала функция showResults() ?
Подскажите, пожалуйста
 
 Top
SAD
Отправлено: 08 Сентября, 2011 - 10:43:50
Post Id



Постоянный участник


Покинул форум
Сообщений всего: 2508
Дата рег-ции: Май 2009  
Откуда: Днепропетровск, Украина


Помог: 75 раз(а)





Вы проявляете неуважение к другим участникам форума с таким обращением Улыбка
 
 Top
algebra
Отправлено: 08 Сентября, 2011 - 10:48:02
Post Id



Частый гость


Покинул форум
Сообщений всего: 171
Дата рег-ции: Февр. 2011  


Помог: 0 раз(а)




если вы поможете, то я не буду против ))
 
 Top
OrmaJever Модератор
Отправлено: 08 Сентября, 2011 - 12:17:13
Post Id



Активный участник


Покинул форум
Сообщений всего: 7540
Дата рег-ции: Янв. 2010  
Откуда: Чернигов


Помог: 299 раз(а)




ого прям личное обращение...
Вобщем я не понял что имено в этот раз не так? Покажите страницу с этим javascript'ом и что нужно из неё взять?


-----
Если вы хотя бы 3-4 раза не решите всё выкинуть и начать заново - вы явно что-то делаете не так.
 
 Top
algebra
Отправлено: 08 Сентября, 2011 - 12:27:45
Post Id



Частый гость


Покинул форум
Сообщений всего: 171
Дата рег-ции: Февр. 2011  


Помог: 0 раз(а)




http://hippodrom[dot]ru/modules/resu[dot][dot].php?race_id=2212 это страница
взять оттуда нужно
CODE (javascript):
скопировать код в буфер обмена
  1. $("div.other_st a").click(function(){
  2.         var race = $(this).attr("rel");
  3.         $("div.other_st").html("<img  style='margin: 0 0 0 300px;' src='/images/loading.gif'>");
  4.   $("div.other_st").load("stavki.jq.php", {race_id: race }, function(){$("div.other_st").slideDown("normal")});
  5.          });          
  6.  
  7. });
  8.  


Но скрипт блокируется этим

CODE (javascript):
скопировать код в буфер обмена
  1. jQuery.autocomplete = function(input, options) {
  2.         // Create a link to self
  3.         var me = this;
  4.  
  5.         // Create jQuery object for input element
  6.         var $input = $(input).attr("autocomplete", "off");
  7.  
  8.         // Apply inputClass if necessary
  9.         if (options.inputClass) $input.addClass(options.inputClass);
  10.  
  11.         // Create results
  12.         var results = document.createElement("div");
  13.         // Create jQuery object for results
  14.         var $results = $(results);
  15.         $results.hide().addClass(options.resultsClass).css("position", "absolute");
  16.         if( options.width > 0 ) $results.css("width", options.width);
  17.  
  18.         // Add to body element
  19.         $("body").append(results);
  20.  
  21.         input.autocompleter = me;
  22.  
  23.         var timeout = null;
  24.         var prev = "";
  25.         var active = -1;
  26.         var cache = {};
  27.         var keyb = false;
  28.         var hasFocus = false;
  29.         var lastKeyPressCode = null;
  30.  
  31.         // flush cache
  32.         function flushCache(){
  33.                 cache = {};
  34.                 cache.data = {};
  35.                 cache.length = 0;
  36.         };
  37.  
  38.         // flush cache
  39.         flushCache();
  40.  
  41.         // if there is a data array supplied
  42.         if( options.data != null ){
  43.                 var sFirstChar = "", stMatchSets = {}, row = [];
  44.  
  45.                 // no url was specified, we need to adjust the cache length to make sure it fits the local data store
  46.                 if( typeof options.url != "string" ) options.cacheLength = 1;
  47.  
  48.                 // loop through the array and create a lookup structure
  49.                 for( var i=0; i < options.data.length; i++ ){
  50.                         // if row is a string, make an array otherwise just reference the array
  51.                         row = ((typeof options.data[i] == "string") ? [options.data[i]] : options.data[i]);
  52.  
  53.                         // if the length is zero, don't add to list
  54.                         if( row[0].length > 0 ){
  55.                                 // get the first character
  56.                                 sFirstChar = row[0].substring(0, 1).toLowerCase();
  57.                                 // if no lookup array for this character exists, look it up now
  58.                                 if( !stMatchSets[sFirstChar] ) stMatchSets[sFirstChar] = [];
  59.                                 // if the match is a string
  60.                                 stMatchSets[sFirstChar].push(row);
  61.                         }
  62.                 }
  63.  
  64.                 // add the data items to the cache
  65.                 for( var k in stMatchSets ){
  66.                         // increase the cache size
  67.                         options.cacheLength++;
  68.                         // add to the cache
  69.                         addToCache(k, stMatchSets[k]);
  70.                 }
  71.         }
  72.  
  73.         $input
  74.         .keydown(function(e) {
  75.                 // track last key pressed
  76.                 lastKeyPressCode = e.keyCode;
  77.                 switch(e.keyCode) {
  78.                         case 38: // up
  79.                                 e.preventDefault();
  80.                                 moveSelect(-1);
  81.                                 break;
  82.                         case 40: // down
  83.                                 e.preventDefault();
  84.                                 moveSelect(1);
  85.                                 break;
  86.                         case 9:  // tab
  87.                         case 13: // return
  88.                                 if( selectCurrent() ){
  89.                                         // make sure to blur off the current field
  90.                                         $input.get(0).blur();
  91.                                         e.preventDefault();
  92.                                 }
  93.                                 break;
  94.                         default:
  95.                                 active = -1;
  96.                                 if (timeout) clearTimeout(timeout);
  97.                                 timeout = setTimeout(function(){onChange();}, options.delay);
  98.                                 break;
  99.                 }
  100.         })
  101.         .focus(function(){
  102.                 // track whether the field has focus, we shouldn't process any results if the field no longer has focus
  103.                 hasFocus = true;
  104.         })
  105.         .blur(function() {
  106.                 // track whether the field has focus
  107.                 hasFocus = false;
  108.                 hideResults();
  109.         });
  110.  
  111.         hideResultsNow();
  112.  
  113.         function onChange() {
  114.                 // ignore if the following keys are pressed: [del] [shift] [capslock]
  115.                 if( lastKeyPressCode == 46 || (lastKeyPressCode > 8 && lastKeyPressCode < 32) ) return $results.hide();
  116.                 var v = $input.val();
  117.                 if (v == prev) return;
  118.                 prev = v;
  119.                 if (v.length >= options.minChars) {
  120.                         $input.addClass(options.loadingClass);
  121.                         requestData(v);
  122.                 } else {
  123.                         $input.removeClass(options.loadingClass);
  124.                         $results.hide();
  125.                 }
  126.         };
  127.  
  128.         function moveSelect(step) {
  129.  
  130.                 var lis = $("li", results);
  131.                 if (!lis) return;
  132.  
  133.                 active += step;
  134.  
  135.                 if (active < 0) {
  136.                         active = 0;
  137.                 } else if (active >= lis.size()) {
  138.                         active = lis.size() - 1;
  139.                 }
  140.  
  141.                 lis.removeClass("ac_over");
  142.  
  143.                 $(lis[active]).addClass("ac_over");
  144.  
  145.                 // Weird behaviour in IE
  146.                 // if (lis[active] && lis[active].scrollIntoView) {
  147.                 //      lis[active].scrollIntoView(false);
  148.                 // }
  149.  
  150.         };
  151.  
  152.         function selectCurrent() {
  153.                 var li = $("li.ac_over", results)[0];
  154.                 if (!li) {
  155.                         var $li = $("li", results);
  156.                         if (options.selectOnly) {
  157.                                 if ($li.length == 1) li = $li[0];
  158.                         } else if (options.selectFirst) {
  159.                                 li = $li[0];
  160.                         }
  161.                 }
  162.                 if (li) {
  163.                         selectItem(li);
  164.                         return true;
  165.                 } else {
  166.                         return false;
  167.                 }
  168.         };
  169.  
  170.         function selectItem(li) {
  171.                 if (!li) {
  172.                         li = document.createElement("li");
  173.                         li.extra = [];
  174.                         li.selectValue = "";
  175.                 }
  176.                 var v = $.trim(li.selectValue ? li.selectValue : li.innerHTML);
  177.                 input.lastSelected = v;
  178.                 prev = v;
  179.                 $results.html("");
  180.                 $input.val(v);
  181.                 hideResultsNow();
  182.                 if (options.onItemSelect) setTimeout(function() { options.onItemSelect(li) }, 1);
  183.         };
  184.  
  185.         // selects a portion of the input string
  186.         function createSelection(start, end){
  187.                 // get a reference to the input element
  188.                 var field = $input.get(0);
  189.                 if( field.createTextRange ){
  190.                         var selRange = field.createTextRange();
  191.                         selRange.collapse(true);
  192.                         selRange.moveStart("character", start);
  193.                         selRange.moveEnd("character", end);
  194.                         selRange.select();
  195.                 } else if( field.setSelectionRange ){
  196.                         field.setSelectionRange(start, end);
  197.                 } else {
  198.                         if( field.selectionStart ){
  199.                                 field.selectionStart = start;
  200.                                 field.selectionEnd = end;
  201.                         }
  202.                 }
  203.                 field.focus();
  204.         };
  205.  
  206.         // fills in the input box w/the first match (assumed to be the best match)
  207.         function autoFill(sValue){
  208.                 // if the last user key pressed was backspace, don't autofill
  209.                 if( lastKeyPressCode != 8 ){
  210.                         // fill in the value (keep the case the user has typed)
  211.                         $input.val($input.val() + sValue.substring(prev.length));
  212.                         // select the portion of the value not typed by the user (so the next character will erase)
  213.                         createSelection(prev.length, sValue.length);
  214.                 }
  215.         };
  216.  
  217.         function showResults() {
  218.                 // get the position of the input field right now (in case the DOM is shifted)
  219.                 var pos = findPos(input);
  220.                 // either use the specified width, or autocalculate based on form element
  221.                 var iWidth = (options.width > 0) ? options.width : $input.width();
  222.                 // reposition
  223.                 $results.css({
  224.                         width: parseInt(iWidth) + "px",
  225.                         top: (pos.y + input.offsetHeight) + "px",
  226.                         left: pos.x + "px"
  227.                 }).show();
  228.         };
  229.  
  230.         function hideResults() {
  231.                 if (timeout) clearTimeout(timeout);
  232.                 timeout = setTimeout(hideResultsNow, 200);
  233.         };
  234.  
  235.         function hideResultsNow() {
  236.                 if (timeout) clearTimeout(timeout);
  237.                 $input.removeClass(options.loadingClass);
  238.                 if ($results.is(":visible")) {
  239.                         $results.hide();
  240.                 }
  241.                 if (options.mustMatch) {
  242.                         var v = $input.val();
  243.                         if (v != input.lastSelected) {
  244.                                 selectItem(null);
  245.                         }
  246.                 }
  247.         };
  248.  
  249.         function receiveData(q, data) {
  250.                 if (data) {
  251.                         $input.removeClass(options.loadingClass);
  252.                         results.innerHTML = "";
  253.  
  254.                         // if the field no longer has focus or if there are no matches, do not display the drop down
  255.                         if( !hasFocus || data.length == 0 ) return hideResultsNow();
  256.  
  257.                         if ($.browser.msie) {
  258.                                 // we put a styled iframe behind the calendar so HTML SELECT elements don't show through
  259.                                 $results.append(document.createElement('iframe'));
  260.                         }
  261.                         results.appendChild(dataToDom(data));
  262.                         // autofill in the complete box w/the first match as long as the user hasn't entered in more data
  263.                         if( options.autoFill && ($input.val().toLowerCase() == q.toLowerCase()) ) autoFill(data[0][0]);
  264.                         showResults();
  265.                 } else {
  266.                         hideResultsNow();
  267.                 }
  268.         };
  269.  
  270.         function parseData(data) {
  271.                 if (!data) return null;
  272.                 var parsed = [];
  273.                 var rows = data.split(options.lineSeparator);
  274.                 for (var i=0; i < rows.length; i++) {
  275.                         var row = $.trim(rows[i]);
  276.                         if (row) {
  277.                                 parsed[parsed.length] = row.split(options.cellSeparator);
  278.                         }
  279.                 }
  280.                 return parsed;
  281.         };
  282.  
  283.         function dataToDom(data) {
  284.                 var ul = document.createElement("ul");
  285.                 var num = data.length;
  286.  
  287.                 // limited results to a max number
  288.                 if( (options.maxItemsToShow > 0) && (options.maxItemsToShow < num) ) num = options.maxItemsToShow;
  289.  
  290.                 for (var i=0; i < num; i++) {
  291.                         var row = data[i];
  292.                         if (!row) continue;
  293.                         var li = document.createElement("li");
  294.                         if (options.formatItem) {
  295.                                 li.innerHTML = options.formatItem(row, i, num);
  296.                                 li.selectValue = row[0];
  297.                         } else {
  298.                                 li.innerHTML = row[0];
  299.                                 li.selectValue = row[0];
  300.                         }
  301.                         var extra = null;
  302.                         if (row.length > 1) {
  303.                                 extra = [];
  304.                                 for (var j=1; j < row.length; j++) {
  305.                                         extra[extra.length] = row[j];
  306.                                 }
  307.                         }
  308.                         li.extra = extra;
  309.                         ul.appendChild(li);
  310.                         $(li).hover(
  311.                                 function() { $("li", ul).removeClass("ac_over"); $(this).addClass("ac_over"); active = $("li", ul).indexOf($(this).get(0)); },
  312.                                 function() { $(this).removeClass("ac_over"); }
  313.                         ).click(function(e) { e.preventDefault(); e.stopPropagation(); selectItem(this) });
  314.                 }
  315.                 return ul;
  316.         };
  317.  
  318.         function requestData(q) {
  319.                 if (!options.matchCase) q = q.toLowerCase();
  320.                 var data = options.cacheLength ? loadFromCache(q) : null;
  321.                 // recieve the cached data
  322.                 if (data) {
  323.                         receiveData(q, data);
  324.                 // if an AJAX url has been supplied, try loading the data now
  325.                 } else if( (typeof options.url == "string") && (options.url.length > 0) ){
  326.                         $.get(makeUrl(q), function(data) {
  327.                                 data = parseData(data);
  328.                                 addToCache(q, data);
  329.                                 receiveData(q, data);
  330.                         });
  331.                 // if there's been no data found, remove the loading class
  332.                 } else {
  333.                         $input.removeClass(options.loadingClass);
  334.                 }
  335.         };
  336.  
  337.         function makeUrl(q) {
  338.                 var url = options.url + "?q=" + encodeURI(q);
  339.                 for (var i in options.extraParams) {
  340.                         url += "&" + i + "=" + encodeURI(options.extraParams[i]);
  341.                 }
  342.                 return url;
  343.         };
  344.  
  345.         function loadFromCache(q) {
  346.                 if (!q) return null;
  347.                 if (cache.data[q]) return cache.data[q];
  348.                 if (options.matchSubset) {
  349.                         for (var i = q.length - 1; i >= options.minChars; i--) {
  350.                                 var qs = q.substr(0, i);
  351.                                 var c = cache.data[qs];
  352.                                 if (c) {
  353.                                         var csub = [];
  354.                                         for (var j = 0; j < c.length; j++) {
  355.                                                 var x = c[j];
  356.                                                 var x0 = x[0];
  357.                                                 if (matchSubset(x0, q)) {
  358.                                                         csub[csub.length] = x;
  359.                                                 }
  360.                                         }
  361.                                         return csub;
  362.                                 }
  363.                         }
  364.                 }
  365.                 return null;
  366.         };
  367.  
  368.         function matchSubset(s, sub) {
  369.                 if (!options.matchCase) s = s.toLowerCase();
  370.                 var i = s.indexOf(sub);
  371.                 if (i == -1) return false;
  372.                 return i == 0 || options.matchContains;
  373.         };
  374.  
  375.         this.flushCache = function() {
  376.                 flushCache();
  377.         };
  378.  
  379.         this.setExtraParams = function(p) {
  380.                 options.extraParams = p;
  381.         };
  382.  
  383.         this.findValue = function(){
  384.                 var q = $input.val();
  385.  
  386.                 if (!options.matchCase) q = q.toLowerCase();
  387.                 var data = options.cacheLength ? loadFromCache(q) : null;
  388.                 if (data) {
  389.                         findValueCallback(q, data);
  390.                 } else if( (typeof options.url == "string") && (options.url.length > 0) ){
  391.                         $.get(makeUrl(q), function(data) {
  392.                                 data = parseData(data)
  393.                                 addToCache(q, data);
  394.                                 findValueCallback(q, data);
  395.                         });
  396.                 } else {
  397.                         // no matches
  398.                         findValueCallback(q, null);
  399.                 }
  400.         }
  401.  
  402.         function findValueCallback(q, data){
  403.                 if (data) $input.removeClass(options.loadingClass);
  404.  
  405.                 var num = (data) ? data.length : 0;
  406.                 var li = null;
  407.  
  408.                 for (var i=0; i < num; i++) {
  409.                         var row = data[i];
  410.  
  411.                         if( row[0].toLowerCase() == q.toLowerCase() ){
  412.                                 li = document.createElement("li");
  413.                                 if (options.formatItem) {
  414.                                         li.innerHTML = options.formatItem(row, i, num);
  415.                                         li.selectValue = row[0];
  416.                                 } else {
  417.                                         li.innerHTML = row[0];
  418.                                         li.selectValue = row[0];
  419.                                 }
  420.                                 var extra = null;
  421.                                 if( row.length > 1 ){
  422.                                         extra = [];
  423.                                         for (var j=1; j < row.length; j++) {
  424.                                                 extra[extra.length] = row[j];
  425.                                         }
  426.                                 }
  427.                                 li.extra = extra;
  428.                         }
  429.                 }
  430.  
  431.                 if( options.onFindValue ) setTimeout(function() { options.onFindValue(li) }, 1);
  432.         }
  433.  
  434.         function addToCache(q, data) {
  435.                 if (!data || !q || !options.cacheLength) return;
  436.                 if (!cache.length || cache.length > options.cacheLength) {
  437.                         flushCache();
  438.                         cache.length++;
  439.                 } else if (!cache[q]) {
  440.                         cache.length++;
  441.                 }
  442.                 cache.data[q] = data;
  443.         };
  444.  
  445.         function findPos(obj) {
  446.                 var curleft = obj.offsetLeft || 0;
  447.                 var curtop = obj.offsetTop || 0;
  448.                 while (obj = obj.offsetParent) {
  449.                         curleft += obj.offsetLeft
  450.                         curtop += obj.offsetTop
  451.                 }
  452.                 return {x:curleft,y:curtop};
  453.         }
  454. }
  455.  
  456. jQuery.fn.autocomplete = function(url, options, data) {
  457.         // Make sure options exists
  458.         options = options || {};
  459.         // Set url as option
  460.         options.url = url;
  461.         // set some bulk local data
  462.         options.data = ((typeof data == "object") && (data.constructor == Array)) ? data : null;
  463.  
  464.         // Set default values for required options
  465.         options.inputClass = options.inputClass || "ac_input";
  466.         options.resultsClass = options.resultsClass || "ac_results";
  467.         options.lineSeparator = options.lineSeparator || "\n";
  468.         options.cellSeparator = options.cellSeparator || "|";
  469.         options.minChars = options.minChars || 1;
  470.         options.delay = options.delay || 400;
  471.         options.matchCase = options.matchCase || 0;
  472.         options.matchSubset = options.matchSubset || 1;
  473.         options.matchContains = options.matchContains || 0;
  474.         options.cacheLength = options.cacheLength || 1;
  475.         options.mustMatch = options.mustMatch || 0;
  476.         options.extraParams = options.extraParams || {};
  477.         options.loadingClass = options.loadingClass || "ac_loading";
  478.         options.selectFirst = options.selectFirst || false;
  479.         options.selectOnly = options.selectOnly || false;
  480.         options.maxItemsToShow = options.maxItemsToShow || -1;
  481.         options.autoFill = options.autoFill || false;
  482.         options.width = parseInt(options.width, 10) || 0;
  483.  
  484.         this.each(function() {
  485.                 var input = this;
  486.                 new jQuery.autocomplete(input, options);
  487.         });
  488.  
  489.         // Don't break the chain
  490.         return this;
  491. }
  492.  
  493. jQuery.fn.autocompleteArray = function(data, options) {
  494.         return this.autocomplete(null, options, data);
  495. }
  496.  
  497. jQuery.fn.indexOf = function(e){
  498.         for( var i=0; i<this.length; i++ ){
  499.                 if( this[i] == e ) return i;
  500.         }
  501.         return -1;
  502. };
 
 Top
OrmaJever Модератор
Отправлено: 08 Сентября, 2011 - 12:43:07
Post Id



Активный участник


Покинул форум
Сообщений всего: 7540
Дата рег-ции: Янв. 2010  
Откуда: Чернигов


Помог: 299 раз(а)




algebra пишет:

у меня по этой странице пишет Error: Йа Ошибко!


-----
Если вы хотя бы 3-4 раза не решите всё выкинуть и начать заново - вы явно что-то делаете не так.
 
 Top
algebra
Отправлено: 08 Сентября, 2011 - 12:48:16
Post Id



Частый гость


Покинул форум
Сообщений всего: 171
Дата рег-ции: Февр. 2011  


Помог: 0 раз(а)




естественно, поэтому мы открывали ее CURLом с Вашей помощью
 
 Top
OrmaJever Модератор
Отправлено: 08 Сентября, 2011 - 15:09:41
Post Id



Активный участник


Покинул форум
Сообщений всего: 7540
Дата рег-ции: Янв. 2010  
Откуда: Чернигов


Помог: 299 раз(а)




окей я открыл курлом и выдало
Цитата:
ТТМ (рейтинг участвующих лошадей относительно ставки на них)
Если номер лошади поставили на первую позицию, в ее ТТМ автоматически добавляется 10руб; вторая позиция - 6руб; третья - 4руб; четвертая - 3руб; и пятая позиция добавляет 2руб.

никакого javascript'а там нет, а что там должно было вывести?


-----
Если вы хотя бы 3-4 раза не решите всё выкинуть и начать заново - вы явно что-то делаете не так.
 
 Top
algebra
Отправлено: 08 Сентября, 2011 - 15:18:36
Post Id



Частый гость


Покинул форум
Сообщений всего: 171
Дата рег-ции: Февр. 2011  


Помог: 0 раз(а)




должно было быть так как в той самой теме, в которой Вы мне помогли
ссылка, в которой работает как надо здесь, но она, естественно уже устаревшая:
http://hippodrom[dot]ru/modules/resu[dot][dot].php?race_id=1859
открывается тоже через CURL
 
 Top
OrmaJever Модератор
Отправлено: 08 Сентября, 2011 - 15:28:08
Post Id



Активный участник


Покинул форум
Сообщений всего: 7540
Дата рег-ции: Янв. 2010  
Откуда: Чернигов


Помог: 299 раз(а)




algebra пишет:
должно было быть так как в той самой теме

вот я и хочу понять где на том сайте имено так показывает?


-----
Если вы хотя бы 3-4 раза не решите всё выкинуть и начать заново - вы явно что-то делаете не так.
 
 Top
algebra
Отправлено: 08 Сентября, 2011 - 15:47:41
Post Id



Частый гость


Покинул форум
Сообщений всего: 171
Дата рег-ции: Февр. 2011  


Помог: 0 раз(а)




странно...

echo curl('http://hippodrom.ru/modules/results/stavki.jq.php?', 'race_id=1859');

работает и выдает


Сделанные ставки: boss (12-11-2-1-3/0), zaza (3-12-1-9-15/0), petlura (11-3-12-10/0), tooth (9-12-11-3/105), alex (11-1-12-2/0), anilin (11-9-1-2-12/0), mixon (3-2-1-12-15/0), WWW (11-1-12-9/0), Vce_Vlad (12-1-2/0), Beloved (11-12-1-9/0), Archer (11-12-3-1-2/0), Laud (11-12-15-2-1/0), player (12-1-2-11/0), Bars (2-9-15-13/0), vasko (11-2-1-12/0), karras (3-11-1-2/0), sveta (12-1-11-9/0), aleks11 (1-11-9-12/0), asser-09 (2-15-12-9/0), gnom (12-1-9-2/0), gena (12-11-1-2/0), Viktor11 (11-3-12-10/0), feniks (12-1-9-2/0), TUTA (11-1-12-2/0), max (11-12-9-2/0), sergey (11-2-1-12/0), agroshov (2-11-1/0), Marie (11-12-3-9-1/0), aleksandr7 (11-1-12-15-2/0), kalahev (11-1-2-6/0), stalker (1-11-12-4/0), veter (12-1-9-15-6/0), DIMA (1-9-12-11/0), senovalich (11-9-2/0), michael (11-1-12-9-8/0), Scorpion1 (1-11-9-12/0), rigodon (1-11-2-9/0), marchello (1-3-2-12/0), Nayman (12-9-11-1/0), dementy (3-9-12-15/0), eka (1-2-12-3/0), 5zigen (9-12-1-15-11/105), miha (9-12-11-1/105), beskarniy (1-11-2-9/0), yson (11-12-1-2/0), ArturTer (11-3-6-4/0), murat888 (9-1-11-10/105), zloff (1-8-11-9-12/0), Ingrit (1-12-10-9-8/0), Magomed (1-9-12-2/0), kentucky (12-11-1-6/0), polikoffff (2-1-15-9-6/0), abzaev (2-1-9-11/0), WOIN (1-2-15-9/0), sinus (9-12-11-1-15/105), SAM (11-12-9-1/0), lena (1-2-9-15-11/0), Serega (1-2-3-13-6/0), Krasnodar (11-12-2-1/0), RAIL777 (11-1-12-2-9/0), Efes (11-2-9-1-15/0), clu4cko (11-12-9-2/0), udarnik (1-2-15-6-11/0), patriot (12-2-1-11/0), yurik (1-11-2-15/0), DIMON (9-1/105), YSON26 (11-9-1-15/0), NINA (9-1-6-15-2/105), Vyacheslav (9-12-15/105), nadoo (1-2-3/0)


и никакого javascript'а там нет Улыбка
 
 Top
Champion Супермодератор
Отправлено: 08 Сентября, 2011 - 20:32:17
Post Id



Активный участник


Покинул форум
Сообщений всего: 4350
Дата рег-ции: Авг. 2008  
Откуда: Москва


Помог: 57 раз(а)




SAD пишет:
Вы проявляете неуважение к другим участникам форума с таким обращением
Ну может просто другие участники не заслужили персонального обращения, OrmaJever проявил мега-профессионализм.
Но тему я всё же переназову.

По вопросу - я конечно не совсем в теме всей истории, но у меня есть стандартный ответ на вопросы по cURL: Поставьте себе, например, fiddler, выполните браузером запрос, как вы это обычно делаете. Вы увидите все заголовки, все куки, которые при этом шлются. Вам останется только повторить их курлом. Ну и, возможно, чуть подумать, как они формируются.
 
 Top
Страниц (1): [1]
Сейчас эту тему просматривают: 0 (гостей: 0, зарегистрированных: 0)
« HTTP и PHP »


Все гости форума могут просматривать этот раздел.
Только зарегистрированные пользователи могут создавать новые темы в этом разделе.
Только зарегистрированные пользователи могут отвечать на сообщения в этом разделе.
 



Powered by PHP  Powered By MySQL  Powered by Nginx  Valid CSS  RSS

 
Powered by ExBB FM 1.0 RC1. InvisionExBB