S
S
SOTVM2018-04-19 20:08:39
PHP
SOTVM, 2018-04-19 20:08:39

How to add the code generated by the php script to the right place in the existing html document?

there is such an html page with cubes on F1, the menu will open,
the script /coub/coubadd.php , when adding a link to the form, sends an API request to coub.com, from the JSON received in response it forms a div element / s, which must be added to the given one, an already existing html page/section .(by default /coub/index.html

html code generated by coubadd.php which needs to be added
<div class="coub" onmouseover="showName(this);"><a href="http://coub.com/view/tgr7" onclick="return frame(this);"><img src="sotvm.best_files/small_1410972233_1393542634_00022.jpg">Dear Lars</a><span>
<php?
echo $coub_info;
?>
</span></div>


the approximate format of the page in which you need to add this code
<html>
<head></head><body>
<div id="fake"></div>
<div id="header"></div>
<div id ="frame-coub"></div>
<div id="coub">
<div> JUDGING SHOULD ENTER CODE </div>
<div class="coub">THE ITEMS ARE ALREADY HERE</div>
</div >
<script></script>
</body>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
l1l1l1, 2018-04-19
@l1l1l1

I propose this option:
create a table in the database and enter all the necessary parameters into it (link to the video, description, and so on),
and on the page where the output is, expand the parameters from the database to the view you need in a loop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question