Awesome q2a theme

How to programmatically check if a redirect on the page?

0 like 0 dislike
27 views
Search for the electronic catalogue of libraries:
5aeb8131ad28d629962897.png

For example, write the title of the book "Design of everyday things" and click the button. First we were thrown to the following address:
http://catalog.mgdb.ru:49001/cgi-bin/koha/opac-search.pl?q=Дизайн+usual+things&idx=ti

Further two variants: if the directory is the book of the same name, we remain on the page; if it only go to her personal page:
http://catalog.mgdb.ru:49001/cgi-bin/koha/opac-detail.pl?biblionumber=31737


How to test it? I'm using Guzzle.
by | 27 views

2 Answers

0 like 0 dislike
Well, the response code to check
if (($code >=300) && ($code <= 399)) { //redirect }
by
0 like 0 dislike
by

Related questions

0 like 0 dislike
1 answer
asked Apr 13, 2019 by sidorchik
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Apr 9, 2019 by DeadikGudwin
110,608 questions
257,187 answers
0 comments
40,796 users