Answer the question
In order to leave comments, you need to log in
How to parse preg_match correctly?
On the VK website, you need to parse hash, (Photo: cs629431.vk.me/v629431117/2677f/ODUBsXtSCNU.jpg ), marked in red that you need to parse it, how exactly to parse it, tried like this:
<?php
// Тут код авторизации для получение куков и т.д
$photoGet = curl("http://vk.com/photo".$photo);
preg_match("/\"desc\":\"\",\"hash\":\"(.*?)\",/", $photoGet, $hash);
Echo $hash[1];
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question