Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. [videojs_hls url='http://mn-i.mncdn.com/foxtv_mobile/smil:foxtv.smil/playlist.m3u8?token=c31bfe38167986e4922c0394488c4bf69639aeaf47863c7b' autoplay='true']Error updating record: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'http://mn-i.mncdn.com/foxtv_mobile/smil:foxtv.smil/playlist.m3u8?token=c31bfe381' at line 1
  2.  
  3. $site_url = "http://site.com.tr/live";
  4. $site = file_get_contents( $site_url );
  5.  
  6. preg_match('@src : '(.*?)',@si',$site,$token);
  7.  
  8.  
  9. $newcontent = "[videojs_hls url='$token[1]' autoplay='true']";
  10. echo $newcontent;
  11.  
  12. $servername = "localhost";
  13. $username = "xxx";
  14. $password = "xxx";
  15. $dbname = "xxx";
  16.  
  17. // Create connection
  18. $conn = new mysqli($servername, $username, $password, $dbname);
  19. // Check connection
  20. if ($conn->connect_error) {
  21. die("Connection failed: " . $conn->connect_error);
  22. }
  23.  
  24. $sql = "UPDATE wp_posts SET post_content='$newcontent' WHERE ID=33";
  25.  
  26. if ($conn->query($sql) === TRUE) {
  27. echo "Record updated successfully";
  28. } else {
  29. echo "Error updating record: " . $conn->error;
  30. }
  31.  
  32. $conn->close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement