Y
Y
yischyk2019-06-14 18:43:21
API
yischyk, 2019-06-14 18:43:21

How to get part of a link with a GET request?

Hey!
how to get clean from https://oauth.vk.com/blank.html#code=8c888738c888bb888 exactly the part after #code=
i.e. 8c888738с888bb888
asked a similar question, but for other purposes.
thank you all very much

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2019-06-14
@yischyk

In php just:

$fragment = parse_url('https://oauth.vk.com/blank.html#code=8c888738с888bb888')['fragment'];
$code = explode('=', $fragment)[1] ?? 'none';
echo $code;

In JS it's even easier:
let code = location.hash.replace('#code=','') || 'none';
console.log(code)

D
Dmitry Krymtsev, 2017-07-29
@moneymakerXA

1050 TI, price from 9k to 13k rubles.
unlike 1050, it is 4GB, not 2.
There may be surprises in the BU card. It's better not to experiment.
ps maybe you can take it from a friend of the miner if he changed his mind to mine)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question