Skip to main content Link Search Menu Expand Document (external link)

Hàm get_content_from

Hàm này dựa vào cơ chế CURL để được hình thành, dùng để lấy nội dung từ một trang web bất kỳ (soi mã nguồn). Mọi người có thể dùng hàm này để làm chức năng leech bài viết.

Cú pháp:

TWIG
get_content_from(url)


Ví dụ:
TWIG
{% set url = POST['url'] %}
<div class="list-group-item">
<form action="" method="get">
<input type="text" value="{{url}}" name="url">
<input type="submit" value="Soi Code"></form></div>
{% if get_content_from(url) %}
<div class="list-group-item">
<textarea style="height:1000px">{{get_content_from(url)}}</textarea>
</div>
{% endif %}

Chia sẻ



QRcode
QRcode