Kodları lütfen aşağıdaki butonları kullanarak renklendirin. Örnek: <php> echo "Selam Dünya"; </php>
Yardım
karakter kaldı

Xml içinde PHP, PHP içinde Xml çalıştırma?

Merhaba arkadaşlar, sizlere iki sorum olacak. Birincisi şöyle;

preview3.SWF adında bir dosyam var. Bu SWF dosyası, video3.XML dosyasından verileri çekiyor.

Normal bir HTML sayfasında aşağıdaki kodları kullanarak, XML ile oluşturulmuş, video playerimi gösteriyorum.

	<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
		<script type="text/javascript" src="swfobject.js"></script>
		
		<script type="text/javascript">
		var flashvars = {};
		// video uzunluk
		var videoWidth = 640;
		// video yükseklik
		var videoHeight = 360;
		// Main Video Path
		flashvars.videoFilePath = "hd_videos/cats_fight.flv";
		// Video buffer zamani (saniye) 
		flashvars.videoBufferTime = "2"
		// otomatik video baslasin mi?. (yes/no)   
		flashvars.autoStartVideoPlay = "no";
        // otomatik ilerki video
		flashvars.autoNextVideo="yes"
 		// video volume sesi
		flashvars.videoStartVolume="75"
		//
		flashvars.infoBackColor="0x000000"
        //
		flashvars.infoBackColorTransparency="50"
		//
		flashvars.showLogo="yes"
		//
 		flashvars.logoImagePath="images/logo.png"
		//
 		flashvars.logoPlacePosition="top-right"
		//
 		flashvars.logoMargin="20"
		//
		flashvars.logoWidth="80"
		//
 		flashvars.logoHeight="47"
		//
 		flashvars.logoTransparency="50"
		//
		flashvars.videoBarColorName="orange"
		//
 		flashvars.volumeBarColorName="orange"
		//
 		flashvars.showCoverImage="yes"
		//
 		flashvars.coverImagePath="images/cover_images.jpg"
		//
		flashvars.hideControlPanelAndMouse="yes"
		//
		flashvars.hideTime="5"
		var params = {};
			params.scale = "noscale";
			params.allowfullscreen = "true";
			params.salign = "tl";
			params.bgcolor = "000000";
		//
		flashvars.TimeToShowInfoOnVideoStart="3"
		//
		flashvars.HD_ModeOn="yes"
		//
		flashvars.HD_buttonVisible="yes"
		//
		flashvars.fullscreenButtonVisible="yes"
		//
		flashvars.aspectRatioMode="1:1"
		//
		//
		flashvars.changeAspectRatioTooltipText="Aspect Ratio"
		//
		flashvars.infoTooltipText="Bilgi"
		//
		flashvars.fullScreenTooltipText="Tam Ekran"
		//
		flashvars.hdButtonTooltipText="HD / SD"
		
		var attributes = {};
		swfobject.embedSWF("shakira.swf", "myContent", videoWidth, videoHeight, "9.0.0", false, flashvars, params, attributes);
		</script>

	<div id="myContent">
			<h1>Alternative content</h1>
			<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
		</div>


Video3.XML dosyasının içeriği de şöyle;

<?xml version="1.0" encoding="UTF-8"?>
<video>
	<config
		videoWidth="640"
		videoHeight="360"
		videoBufferTime="2"
		autoStartVideoPlay="no"
		autoNextVideo="yes"
 		videoStartVolume="75"
		playerSkinNumber="3"
		thumbImageWidth="140"
		thumbImageHeight="79"
		thumbImageBorder="5"
		thumbImageBorderColor="0x000000"
		thumbImageMargin="10"
		playListPosition="down"
		playListSpace="1"
		playlistBackColor="0x000000"
 		playlistBackColorTransparency="0"
		infoBackColor="0x000000"
		infoBackColorTransparency="50"
		showLogo="yes"
 		logoImagePath="images/logo.png"
 		logoPlacePosition="top-right"
 		logoMargin="20"
		logoWidth="80"
 		logoHeight="47"
 		logoTransparency="50"
		videoBarColorName="orange"
 		volumeBarColorName="orange"
 		showCoverImage="yes"
 		coverImagePath="images/cover_images.jpg"
		hideControlPanelAndMouse="yes"
		hideTime="5"
		TimeToShowInfoOnVideoStart="3"
		HD_ModeOn="yes"
		HD_buttonVisible="yes"
		fullscreenButtonVisible="yes"
		hideShowPlaylistButtonVisible="yes"
		mousePlaylistScrollSpeed="0.1"
		aspectRatioMode="1:1"
		removePlayList="no"
		autoHidePlaylistWhenVideoPlay="yes"
		preloadFirstVideoFile="yes"
		showThumbnailPreviewToolTipTitle="yes"
		hideShowPlaylistTooltipText="Hide / Show Playlist"
		changeAspectRatioTooltipText="Aspect Ratio"
		infoTooltipText="Bilgi"
		fullScreenTooltipText="Tam Ekran"
		hdButtonTooltipText="HD / SD"
	/>
	<video_item> 
		<hd_video_path>hd_videos/1.flv</hd_video_path>
		<sd_video_path>sd_videos/1.flv</sd_video_path>
		<video_title><![CDATA[<font color="#99CCFF" size="28">Elegant Extrusion</font>]]></video_title>
		<video_description><![CDATA[<font color="#FFFFFF" size="14">You can purchase this video from </font><font color="#00FFFF" size="14">Videohive!</font> <font color="#FFFF00" size="14"><a href='http://videohive.net/item/elegant-extrusion/142766' target='_blank'>Please Click Here.</a></font>]]></video_description>
		<thumb_image_tooltip_title>Elegant Extrusion</thumb_image_tooltip_title>
		<thumb_image_path>thumb_images/1.jpg</thumb_image_path>
		<playListRollOverBackColor>0xFFFFFF</playListRollOverBackColor>
	</video_item>
	<video_item> 
		<hd_video_path>hd_videos/2.flv</hd_video_path>
		<sd_video_path>sd_videos/2.flv</sd_video_path>
		<video_title><![CDATA[<font color="#00FFFF" size="28">Elegant Ring Logo</font>]]></video_title>
		<video_description><![CDATA[<font color="#FFFFFF" size="14">You can purchase this video from </font><font color="#00FFFF" size="14">Videohive!</font> <font color="#FFFF00" size="14"><a href='http://videohive.net/item/elegant-ring-logo/148353' target='_blank'>Please Click Here.</a></font>]]></video_description>
		<thumb_image_tooltip_title>Elegant Ring Logo</thumb_image_tooltip_title>
		<thumb_image_path>thumb_images/2.jpg</thumb_image_path>
		<playListRollOverBackColor>0xFFFFFF</playListRollOverBackColor>
	</video_item>
	<video_item> 
		<hd_video_path>hd_videos/3.flv</hd_video_path>
		<sd_video_path>sd_videos/3.flv</sd_video_path>
		<video_title><![CDATA[<font color="#66FFCC" size="28">Light Scribble Logo</font>]]></video_title>
		<video_description><![CDATA[<font color="#FFFFFF" size="14">You can purchase this video from </font><font color="#00FFFF" size="14">Videohive!</font> <font color="#FFFF00" size="14"><a href='http://videohive.net/item/light-scribble-logo-cs3/98979' target='_blank'>Please Click Here.</a></font>]]></video_description>
		<thumb_image_tooltip_title>Light Scribble Logo</thumb_image_tooltip_title>
		<thumb_image_path>thumb_images/3.jpg</thumb_image_path>
		<playListRollOverBackColor>0xFFFFFF</playListRollOverBackColor>
	</video_item>
	<video_item> 
		<hd_video_path>hd_videos/4.flv</hd_video_path>
		<sd_video_path>sd_videos/4.flv</sd_video_path>
		<video_title><![CDATA[<font color="#FFFF00" size="28">Elegant Logo Reveler</font>]]></video_title>
		<video_description><![CDATA[<font color="#FFFFFF" size="14">You can purchase this video from </font><font color="#00FFFF" size="14">Videohive!</font> <font color="#FFFF00" size="14"><a href='http://videohive.net/item/stylishelegant-logo-reveler-cs3/127165' target='_blank'>Please Click Here.</a></font>]]></video_description>
		<thumb_image_tooltip_title>Elegant Logo Reveler</thumb_image_tooltip_title>
		<thumb_image_path>thumb_images/4.jpg</thumb_image_path>
		<playListRollOverBackColor>0xFFFFFF</playListRollOverBackColor>
	</video_item>
	<video_item> 
		<hd_video_path>hd_videos/1.flv</hd_video_path>
		<sd_video_path>sd_videos/1.flv</sd_video_path>
		<video_title><![CDATA[<font color="#99CCFF" size="28">Elegant Extrusion</font>]]></video_title>
		<video_description><![CDATA[<font color="#FFFFFF" size="14">You can purchase this video from </font><font color="#00FFFF" size="14">Videohive!</font> <font color="#FFFF00" size="14"><a href='http://videohive.net/item/elegant-extrusion/142766' target='_blank'>Please Click Here.</a></font>]]></video_description>
		<thumb_image_tooltip_title>Elegant Extrusion</thumb_image_tooltip_title>
		<thumb_image_path>thumb_images/1.jpg</thumb_image_path>
		<playListRollOverBackColor>0xFFFFFF</playListRollOverBackColor>
	</video_item>
	<video_item> 
		<hd_video_path>hd_videos/2.flv</hd_video_path>
		<sd_video_path>sd_videos/2.flv</sd_video_path>
		<video_title><![CDATA[<font color="#00FFFF" size="28">Elegant Ring Logo</font>]]></video_title>
		<video_description><![CDATA[<font color="#FFFFFF" size="14">You can purchase this video from </font><font color="#00FFFF" size="14">Videohive!</font> <font color="#FFFF00" size="14"><a href='http://videohive.net/item/elegant-ring-logo/148353' target='_blank'>Please Click Here.</a></font>]]></video_description>
		<thumb_image_tooltip_title>Elegant Ring Logo</thumb_image_tooltip_title>
		<thumb_image_path>thumb_images/2.jpg</thumb_image_path>
		<playListRollOverBackColor>0xFFFFFF</playListRollOverBackColor>
	</video_item>
	<video_item> 
		<hd_video_path>hd_videos/3.flv</hd_video_path>
		<sd_video_path>sd_videos/3.flv</sd_video_path>
		<video_title><![CDATA[<font color="#66FFCC" size="28">Light Scribble Logo</font>]]></video_title>
		<video_description><![CDATA[<font color="#FFFFFF" size="14">You can purchase this video from </font><font color="#00FFFF" size="14">Videohive!</font> <font color="#FFFF00" size="14"><a href='http://videohive.net/item/light-scribble-logo-cs3/98979' target='_blank'>Please Click Here.</a></font>]]></video_description>
		<thumb_image_tooltip_title>Light Scribble Logo</thumb_image_tooltip_title>
		<thumb_image_path>thumb_images/3.jpg</thumb_image_path>
		<playListRollOverBackColor>0xFFFFFF</playListRollOverBackColor>
	</video_item>
	<video_item> 
		<hd_video_path>hd_videos/4.flv</hd_video_path>
		<sd_video_path>sd_videos/4.flv</sd_video_path>
		<video_title><![CDATA[<font color="#FFFF00" size="28">Elegant Logo Reveler</font>]]></video_title>
		<video_description><![CDATA[<font color="#FFFFFF" size="14">You can purchase this video from </font><font color="#00FFFF" size="14">Videohive!</font> <font color="#FFFF00" size="14"><a href='http://videohive.net/item/stylishelegant-logo-reveler-cs3/127165' target='_blank'>Please Click Here.</a></font>]]></video_description>
		<thumb_image_tooltip_title>Elegant Logo Reveler</thumb_image_tooltip_title>
		<thumb_image_path>thumb_images/4.jpg</thumb_image_path>
		<playListRollOverBackColor>0xFFFFFF</playListRollOverBackColor>
	</video_item>
</video>


Ben ise, mesela
hd_videos/1.flv
yazan yere;
<?php echo; ?>
yazmam gerekiyo. Ve video.php, sayfamda ise playerimi göstermem gerekiyor. yardımlarınızı beklerim.
+0
-0
Cevaba KatılıyorumKatılmıyorum
Cevap Yaz Yorum Yaz Arşivime Ekle Takip Et

Cevaplar

  • katapult adlı üyenin fotoğrafı
    9 yıl önce yazılmış
    53 cevap - 22 soru
    Bunun cevabını bende bilmiyordum ama biraz internette baktım.

    Şu linklerdeki bilgileri bir dene derim.

    http://aydindeger.tumblr.com/post/21110818564/xml-icine-php-kod-yazma
    

    
    http://www.r10.net/php/283366-xml-icine-php-olur-mu.html
    
    • olcay adlı üyenin fotoğrafı olcay
      teşekkürler ama, bunları uyguladım fakat olmadı.
      9 yıl önce yazılmış