Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. $request = explode("/", trim($_SERVER["PATH_INFO"], "/"));
  5. include "dbconnect.php";
  6. $table = preg_replace("/[^a-z0-9_]+/i", "", array_shift($request));
  7. $table = mysqli_real_escape_string($link, (string) $table);
  8. $hashtag = array_shift($request);
  9. $hashtag = mysqli_real_escape_string($link, (string) $hashtag);
  10. $spinRange = array_shift($request) + 0;
  11. $post_id = array_shift($request) + 0;
  12. $sql = "SELECT share_title, title, caption, link_tag, twtAuthor, app_id FROM posts WHERE post_id=" . $post_id;
  13. $result = mysqli_query($link, $sql);
  14. if (!$result) {
  15. http_response_code(404);
  16. exit(mysqli_error());
  17. }
  18. $post = mysqli_fetch_object($result);
  19. $_title = $post->share_title;
  20. $_btitle = $post->title;
  21. $_caption = $post->caption;
  22. $_linktag = $post->link_tag;
  23. $_twtAuthor = $post->twtAuthor;
  24. $_appid = $post->app_id;
  25. $_host = "https://" . $_SERVER["HTTP_HOST"];
  26. $_hostaddon = "https://" . PURWAK;
  27. $_loader = "//" . PURWAK;
  28. $_hostaddoncloud = "https://" . PURWAK_CLOUD;
  29. $_host2 = "https://" . IMAGE_SUBDOMAIN;
  30. header("Content-Type: image/jpeg");
  31. $ogArr = array();
  32. $ogArr[] = imageCreateFromjpeg("../" . $post_id . "/fb_ogimage1.jpg");
  33. $ogArr[] = imageCreateFromjpeg("../" . $post_id . "/fb_ogimage2.jpg");
  34. $ogArr[] = imageCreateFromjpeg("../" . $post_id . "/fb_ogimage3.jpg");
  35. $ogArr[] = imageCreateFromjpeg("../"......
  36. ......................
  37. ......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement