Skip to content
Extraits de code Groupes Projets
Valider 8cd54ddc rédigé par hsellambin's avatar hsellambin
Parcourir les fichiers

mise a jour auto nombre abonné insta

parent d0e47bb1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -25,6 +25,19 @@ include "header.php";
</div>
</section>
<!-- -------------------timer------------------ -->
<script>
var timeleft = 10;
var downloadTimer = setInterval(function(){
document.getElementById("countdown").innerHTML = timeleft + " seconds";
timeleft -= 1;
if(timeleft <= 0){
clearInterval(downloadTimer);
document.getElementById("countdown").innerHTML = "Vers l'infini et au-delà <i class=\"fas fa-rocket\"></i>"
}
}, 1000);
</script>
<?php
include "footer.php"
?>
......
......@@ -80,6 +80,8 @@ function nFormatter(num){
}
var tab=new Array();
var commentaire=new Array();
var nbInsta;
var user = "<?=$_GET['user'];?>";
$.ajax({
url:"https://www.instagram.com/<?php echo $_GET['user'];?>?__a=1",
type:'get',
......@@ -94,6 +96,7 @@ $.ajax({
$(".followers").html(nFormatter(response.graphql.user.edge_followed_by.count));
$(".following").html(nFormatter(response.graphql.user.edge_follow.count));
posts = response.graphql.user.edge_owner_to_timeline_media.edges;
nbInsta = response.graphql.user.edge_followed_by.count;
posts_html = '';
for(var i=0;i<6;i++){
url = posts[i].node.display_url;
......@@ -151,10 +154,27 @@ $.ajax({
chart.render();
}
addPoints()
$.ajax({
type: "POST",
url: "nb_insta.php",
data: {
nbInsta:nbInsta,
user:user,
},
success: function(response)
{
}
});
}
});
</script>
<?php
include "footer.php"
?>
......
......@@ -24,15 +24,4 @@ if($(document).scrollTop()>0){
new WOW().init();
</script>
<!-- -------------------timer------------------ -->
<script>
var timeleft = 10;
var downloadTimer = setInterval(function(){
document.getElementById("countdown").innerHTML = timeleft + " seconds";
timeleft -= 1;
if(timeleft <= 0){
clearInterval(downloadTimer);
document.getElementById("countdown").innerHTML = "Vers l'infini et au-delà <i class=\"fas fa-rocket\"></i>"
}
}, 1000);
</script>
<?php
include "./config/database.php";
var_dump($_POST);
$nbInsta = (isset($_POST['nbInsta']))?$_POST['nbInsta']:null;
$user = (isset($_POST['user']))?$_POST['user']:null;
$sql="UPDATE influenceurs set nb_instagram='$nbInsta' where tag_instagram='$user'";
if(mysqli_query($link, $sql)===TRUE){
echo "DATA updated";
}
?>
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter