ckopnuoh191 Posted April 18, 2012 Report Share Posted April 18, 2012 Хотелось бы узнать можно ли сделать такой скрипт?К примеру есть ссылка www.site.ru/rex/exit.php?urlind=9876&flip=1&opk=1001нужно что бы после каждого нажатия и перехода по ней менялась последняя цифра, т.е. была 1001 стала 1002 Quote Link to comment Share on other sites More sharing options...
0 Great Rash Posted April 18, 2012 Report Share Posted April 18, 2012 можно Quote Link to comment Share on other sites More sharing options...
0 Switch74 Posted April 19, 2012 Report Share Posted April 19, 2012 реализация зависит от более конкретных условий использования данной функции, это можно реализовать и js и php в последнем за счет сессий и куков или баз данных и файлов Quote Link to comment Share on other sites More sharing options...
0 ckopnuoh191 Posted April 19, 2012 Author Report Share Posted April 19, 2012 уже радует, js было бы идеально.А кто безвозмездно сможет это сделать? Буду ОЧЕНЬ благодарен. Quote Link to comment Share on other sites More sharing options...
0 Switch74 Posted April 19, 2012 Report Share Posted April 19, 2012 цель этого скрипта?данный скрипт будет отрабатывать для каждого пользователя в отдельностит.е. счетчик посещения вряд ли получится это скорее листание страниц Quote Link to comment Share on other sites More sharing options...
0 ckopnuoh191 Posted April 19, 2012 Author Report Share Posted April 19, 2012 Во во именно так, просматривание страниц. Quote Link to comment Share on other sites More sharing options...
0 Switch74 Posted April 19, 2012 Report Share Posted April 19, 2012 <script>function nextpage(){ var tmp = new Array(); var param = new Array(); var get = window.location.search; var url = window.location.href.split('?'); url = url[0]; if(get != '') { get = (get.substr(1)).split('&'); for(var i=0; i < get.length; i++) { tmp = get[i].split('='); param[tmp[0]] = tmp[1]; } if(param['opk'] !== undefined) param['opk'] = parseInt(param['opk'])+1; else param['opk'] = 1; url += '?'; get = ''; for(var key in param) { get += '&'+ param[key]; } get = get.substr(1); } window.location.href = url + get;}</script><a onclick="nextpage();">Следующая</a>вроде должно работать, скрипт качал от сюда и немного модернизировал Quote Link to comment Share on other sites More sharing options...
0 ckopnuoh191 Posted April 19, 2012 Author Report Share Posted April 19, 2012 ммм...жаль что я в этом не соображаю) можно вам обратиться в личку, более подробно объяснить Quote Link to comment Share on other sites More sharing options...
0 Switch74 Posted April 19, 2012 Report Share Posted April 19, 2012 ну попробуй, оперативных ответов не обещаю Quote Link to comment Share on other sites More sharing options...
0 ckopnuoh191 Posted April 19, 2012 Author Report Share Posted April 19, 2012 как можно с вами связаться? Quote Link to comment Share on other sites More sharing options...
0 Switch74 Posted April 19, 2012 Report Share Posted April 19, 2012 а здесь ни как? Quote Link to comment Share on other sites More sharing options...
0 ckopnuoh191 Posted April 19, 2012 Author Report Share Posted April 19, 2012 Можно и здесьу меня тут есть другая идея, думаю ее будет проще осуществитьдопустим есть 10 или более сайтовwww_site_ru/rex/exit.php?urlind=9876&flip=1&opk=1001www_site_ru/rex/exit.php?urlind=9876&flip=1&opk=1001...www_site_ru/rex/exit.php?urlind=9876&flip=1&opk=1010нужно что бы они грузились по очереди Quote Link to comment Share on other sites More sharing options...
0 Int Posted April 19, 2012 Report Share Posted April 19, 2012 А зачем такой здоровенный скрипт? Регуляркой вырезать было бы гораааааздо короче. [\?&]opk=(\d+) и всё Quote Link to comment Share on other sites More sharing options...
0 ckopnuoh191 Posted April 19, 2012 Author Report Share Posted April 19, 2012 суть в том что это ссылка не на мой сайт) а другого сайтамне нужно одним нажатием просмотреть по порядку несколько страниц Quote Link to comment Share on other sites More sharing options...
Question
ckopnuoh191
Хотелось бы узнать можно ли сделать такой скрипт?
К примеру есть ссылка
www.site.ru/rex/exit.php?urlind=9876&flip=1&opk=1001
нужно что бы после каждого нажатия и перехода по ней менялась последняя цифра, т.е. была 1001 стала 1002
Link to comment
Share on other sites
13 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.