M
M
mrgloom2014-10-10 20:14:33
GitHub
mrgloom, 2014-10-10 20:14:33

The easiest way to make a blog on github.io?

As I understand it, it is assumed that the user creates a static .html page with his own hands (and some jekyll is still moving there).
Is there any faster way? Those. just an editor, like in a regular blog with the ability to add posts, and insert links and images into posts.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Alex Db, 2014-10-10
@alexdb

CONQUERING JEKYLL
How to use Jekyll with plugins on github pages

T
Taras Labiak, 2014-10-11
@kissarat

But why use github.io??

_
_ _, 2014-10-11
@AMar4enko

You can do SPA. On github.io, store all the necessary static that drags the API from your server. True, there will be a problem with indexing.

I
Ilya, 2016-11-06
@ASiD

Good afternoon.
Yes, your code should be corrected:

$post  = array('key' => 'value'); // укажите данные для отправки через POST
$headers = array('Content-Type: application/json', 'Authorization: Token 123', 'X-Secret: 123');

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // отправка заголовков
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post); // POST-данные
curl_setopt($ch, CURLOPT_URL, 'https://dadata.ru/api/v2/clean/phone');
$result = curl_exec($ch);  
curl_close($ch);
echo $result;

Feel free to adapt the code to suit your specific needs. I just specified a vector.

D
Dimonchik, 2016-11-06
@dimonchik2013

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
but generally use www.telerik.com/fiddler

N
nalgeon, 2021-08-05
@nalgeon

If you don’t know how or don’t want to work with composer: an example of calling “Dadata” from PHP with one file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question