// prepare sql and bind parameters
$stmt = $conn->prepare("INSERT INTO MyGuests (firstname, lastname, email)
VALUES (:firstname, :lastname, :email)");
$stmt->bindParam(':firstname', $firstname);
$stmt->bindParam(':lastname', $lastname);
$stmt->bindParam(':email', $email);
// insert a row
$firstname = "John";
$lastname = "Doe";
$email = "john@example.com";
$stmt->execute();
// insert another row
$firstname = "Mary";
$lastname = "Moe";
$email = "mary@example.com";
$stmt->execute();
// insert another row
$firstname = "Julie";
$lastname = "Dooley";
$email = "julie@example.com";
$stmt->execute();
echo htmlspecialchars($bc, ENT_QUOTES);
#[^\p{Cyrillic}a-zA-Z0-9]#u
<?php
$pcreReflector = new ReflectionExtension("pcre");
$pcreReflector->info();
каким-то образом также раскодировать
# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r".*?([0-9]+)\s?м².*"
test_str = "1-к квартира, 39 м², 1/5 эт."
subst = "\\1"
# You can manually specify the number of replacements by changing the 4th argument
result = re.sub(regex, subst, test_str, 0, re.MULTILINE | re.UNICODE)
if result:
print (result)
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
а вот и основной код, точнее php часть
<?php
require_once('config.php'); // <- session_start(); внутри
?>
<!doctype html>
<html>
<head></head>
<body>
<?php
if(empty($_SESSION['token'])){
echo " <a href='https://oauth.vk.com/authorize?client_id=".$appid." &display=page&redirect_uri=".$redirect_url."&scope=".$scope."&response_type=code&v=5.62
' >Вход по вк </a> " ;
}
else{
$go = "https://api.vk.com/method/users.get?fields=photo_50&https://api.vk.com/method&v=5.52&access_token=" . $_SESSION['token'];
$ku = curl_init();
curl_setopt($ku, CURLOPT_URL, $go);
curl_setopt($ku, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ku, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ku, CURLOPT_RETURNTRANSFER, TRUE);
$result = json_decode(curl_exec($ku));
$ava=$result->response[0]->photo_50;
$first_name=$result->response[0]->first_name;
$last_name=$result->response[0]->last_name;
$id=$result->response[0]->id;
echo "$bal ";
echo "$first_name";
echo "<a href = 'https://vk.com/id".$id."'><img src='".$ava."'></a></br>";
echo " <a href='logout.php' >Выход </a> " ;
}
?>
</body>
</html>
То есть со всеми GET параметрами как вы вызываете, например
script.php?article=...&name=... и тд
1. url который работает
2. url который не работает