J
J
just_bitcing2015-04-21 17:10:54
PHP
just_bitcing, 2015-04-21 17:10:54

How to send a picture to the wall by attaching an image through its address passed by function?

How to insert instead of /tmp/123.jpg the value of the $funtion function, which we get before, which is the url of the image and so that it uploads this image to the VK server? :
<?php
require_once('../src/Vkontakte.php');
$accessToken = 'your access token';
$vkAPI = new \BW\Vkontakte(['access_token' => $accessToken]);
$vkAPI->postToPublic(70941690, '/tmp/123.jpg');
I tried to just prescribe $ funtion instead of the address, but curl starts to pour errors.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
He11ion, 2015-04-21
@He11ion

In php, a function cannot start with a $ sign, learn the materiel php.net/manual/ru/functions.user-defined.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question