Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Skrypt Facebook sie nie wykonuje
promarian1970
post
Post #1





Grupa: Zarejestrowani
Postów: 12
Pomógł: 0
Dołączył: 17.02.2013

Ostrzeżenie: (0%)
-----


Skrypt Facebook sie nie wykonuje


  1. <?php
  2.  
  3. require('../connect.php');
  4. //echo'<meta http-equiv="refresh" content="5">';
  5. //ini_set('display_errors',0);
  6. $id=$_GET['id'];
  7. $next=$id+1;
  8.  
  9. require("../facebook.php");
  10.  
  11. $facebook = new Facebook(array(
  12. 'appId' => $app_id,
  13. 'secret' => $app_secret,
  14.  
  15. ));
  16.  
  17.  
  18. mysql_query("UPDATE `token_wdechowe` SET `active` = '0' WHERE `id`='$id'");
  19. mysql_query ("SET NAMES 'utf8'");
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28. $jakis_los = rand(1,1000);
  29.  
  30. $post =mysql_query("SELECT * FROM shity WHERE id ='2392'");
  31. //$post =mysql_query("SELECT * FROM `shity` ORDER BY RAND() LIMIT 0,1");
  32. $post = mysql_fetch_assoc($post);
  33.  
  34.  
  35.  
  36.  
  37. $qccdd =mysql_query("SELECT * FROM `token_wdechowe` WHERE id='$id' ");
  38. $qcc = mysql_fetch_assoc($qccdd);
  39.  
  40. //if(date('d')==$qcc['wrzucenie']){die('Juz dodalem<br><hr>');}
  41.  
  42.  
  43. //$facebook->setAccessToken();
  44. $img = $post['img'];
  45.  
  46. $img = str_replace('img/upload','',$img);
  47.  
  48. $typ='obrazek.php?'.$post['id'];
  49.  
  50. //$pic = str_replace('upload','upload_min',$post['img']);
  51.  
  52.  
  53. $cou = count($table)-1;
  54.  
  55. $rlos = rand(0,$cou);
  56.  
  57. $minka = $table[$rlos];
  58.  
  59.  
  60.  
  61. $alle = $facebook->api('/me/feed', 'POST', array(
  62. 'access_token' =>$qcc['token'],
  63. 'link' => 'http://www.takie-tu.pl/redir.php?typ='.$typ,
  64. //'message' => 'O nieee !!!',
  65. 'message' => 'takie switfocie to mi sie podobaja ',
  66. 'description' => rand(978,2987).' osób widziało ten obrazek !!!',
  67. 'name' => $post['title'],
  68. 'caption' => 'wdeche',
  69. 'picture' => 'http://www.takie-tu.pl/img/obrazki/'.$img
  70. ));
  71.  
  72.  
  73.  
  74.  
  75.  
  76. $czasek = date('d');
  77.  
  78.  
  79. mysql_query("UPDATE `token_wdechowe` SET `wrzucenie` = '$czasek',`active` = '1' WHERE `id`='$id'");
  80.  
  81. if($alle){
  82. echo "<b style='color:green;'>Dodabne</b>".$post['title'];
  83. }else{
  84. echo "<b style='color:red;'>Nie dodano</b>";
  85. }
  86. echo '<script>document.location="?id='.$next.'";</script>';
  87.  
  88.  
  89.  
  90. ?>





Jesli go odpale w przegladarce nic sie nie wyswietla (IMG:style_emoticons/default/sad.gif)

Co robic. Prosze o jakies propozycje
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 12.10.2025 - 19:22