我有一些大约60个PHP脚本,其中包含每10秒刷新一次的图像,源代码来自实时流媒体服务器<我的问题是如何将它们添加到WP?一些代码在图像上
最终,结果应该是每10秒刷新一次图像。有什么想法吗?我应该创建一个短代码吗?然后在里面插入代码?有插件吗?
<?php
ini_set("default_socket_timeout", 10);
// Report all PHP errors (see changelog)
error_reporting(0);
date_default_timezone_set("Europe/Athens");
copy("http:/streaming/channels/1/picture", "temp.jpg");
header(\'Content-Type: image/jpeg\');
$cam_me = @imagecreatefromjpeg(\'temp.jpg\');
//йахояислос вяылатым
$white = imagecolorallocate($cam_me, 255, 255, 255);
$grey = imagecolorallocate($cam_me, 128, 128, 128);
$blue = imagecolorallocate($cam_me, 0, 0, 200);
$black = imagecolorallocate($cam_me, 0, 0, 0);
$offblack = imagecolorallocate($cam_me, 30, 30, 30);
//LOGO
$cam_logo = @imagecreatefrompng(\'logo.png\');
$cam_logo2 = @imagecreatefromjpeg(\'logo2.jpg\');
//Create blue frame
imagefilledrectangle($cam_me, 0, 0, 2688, 30, $blue);
//
//Font
$font = \'tahoma.ttf\';
//елжамисг омолатос йалеяас
imagettftext($cam_me, 25, 0, 800, 30, $white, $font, "Σαμαρίνα Πλατεία" );
imagettftext($cam_me, 30, 0, 2460, 1265, $white, $font, "" );
imagettftext($cam_me, 30, 0, 0, 1350, $white, $font, "" );
imagettftext($cam_me, 40, 0, 2100, 1390, $white, $font, "" );
//Import LOGO
imagecopy($cam_me, $cam_logo, 1600, 80, 0, 0, 300,129);
imagecopy($cam_me, $cam_logo2, 2500, 1338, 0, 0, 161, 160);
imagejpeg($cam_me);
imagejpeg($cam_me, \'samarinaplateia.jpg\');
imagedestroy($cam_me);
imagedestroy($cam_logo);
imagedestroy($cam_logo2);
?>