Jump to content

php method to retrieve file from xml


oli22

Recommended Posts

Ok i will read up on simplexml, which i know the basic to only use simple text.

But i have found an easier way.

Instead of getting the embed directly from xml i am using php includes with embeds in them, no harcore xml parsing required.

From videoThumbs.php i use:

<a href="playPage.php?movieTitle=funnySketch"  >

Then use a 'GET' on playPage.php

<?php

$playVideo = $_GET['movieTitle'];

?>

Use $playVideo variable  to embed with an include

<?php include("includesFolder/$playVideo.php"); ?>

 

Thats my basic quick working solution, i have to finish this thing fast.

Next i will use 'simplexml' to show title and video description,

no  heavy duty parsing required for simple text...

 

Its might be a little odd to have data coming from 2 places,1)the xml 2)includesFolder

MAy be i will learn something else on my way there...

 

By the way, i was thinking: Isn't it better to have an indivudual  html page for each video&description for SEO?

 

Any avice about tecnical my solution???

Link to comment
Share on other sites

Even better maybe would be to 'GET' somesort of id from videoThumbs.php so even the php include is

writen in the xml, tha way ALL the info is in the xml tree.

<?php include("includesFolder/$playVideo.php"); ?>

would be

<?php include("includesFolder/variable from xml.php"); ?>

 

Thats the rest of my question i suppose ::)

 

Any avice about tecnical my solution???

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.