
Graxeon
Members-
Posts
260 -
Joined
-
Last visited
Everything posted by Graxeon
-
I have an idea of how this could work...but I don't really know the exact coding for it: A user requests something like "video.php?s=stickman&e=4" s = show e = episode Now there are many combinations that can be made with that request. Examples: video.php?s=nature&e=70 video.php?s=car&e=10 This is what would be run in video.php: <?php if $s=car -then $i='http://domain.com/car.png' -then $l='http://domain.com/car.html' -then $t=14 -then run: --Take $e and match it with the corresponding number (example: video.php?a=car&e=2 would correspond with $2) --$1='http://domain.com/car1.flv' --$2='http://domain.com/car2.flv' --$3='http://domain.com/car3.flv' or if $s=nature -then $i='http://domain.com/nature.png' -then $l='http://domain.com/nature.html' -then $t=91 -then run: --Take $e and match it with the corresponding number (example: video.php?a=nature&e=1 would correspond with $1) --$1='http://domain.com/nature1-1.flv';'http://domain.com/nature1-2.flv';'http://domain.com/nature1-3.flv' --$2='http://domain.com/nature2-1.flv';'http://domain.com/nature2-2.flv' --$3='http://domain.com/nature3-1.flv';'http://domain.com/nature3-2.flv';'http://domain.com/nature3-3.flv';'http://domain.com/nature3-4.flv' or if $s=stickman -then $i='http://domain.com/stickman.png' -then $l='http://domain.com/stickman.html' -then $t=43 -then run: --Take $e and match it with the corresponding number (example: video.php?a=stickman&e=3 would correspond with $3) --$1='http://domain.com/stickman1.flv' --$2='http://domain.com/stickman2.flv' --$3='http://domain.com/stickman3.flv' //etc, etc Then take the values and generate an XML file. Let's say that the request was "video.php?s=nature&e=3": echo all of this: <?xml version="1.0" encoding="UTF-8"?> <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> //The first track is a little different from the rest <track> <annotation>$s</annotation> <location>$i</location> <title>$t</title> <info>$l</info> </track> <track> <annotation>$s</annotation> <location>$e$3-first URL</location>//note the difference in the other tracks for the "location" tag <title>$t</title> <info>$l</info> </track> <track> <annotation>$s</annotation> <location>$e$3-second URL</location>//note the difference in the other tracks for the "location" tag <title>$t</title> <info>$l</info> </track> <track> <annotation>$s</annotation> <location>$e$3-third URL</location>//note the difference in the other tracks for the "location" tag <title>$t</title> <info>$l</info> </track> <track> <annotation>$s</annotation> <location>$e$3-fourth URL</location>//note the difference in the other tracks for the "location" tag <title>$t</title> <info>$l</info> </track> //etc, etc until all of the different URLs were implemented (in this case there were 4 different URLs within the //$3 of $e in $nature) </trackList> </playlist> The final generated product of "video.php?s=nature&e=3" would then look like this: <?xml version="1.0" encoding="UTF-8"?> <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> //The first track is a little different from the rest <track> <annotation>Nature</annotation> <location>http://domain.com/nature.png</location> <title>91</title> <info>http://domain.com/nature.html</info> </track> <track> <annotation>Nature</annotation> <location>http://domain.com/nature3-1.flv</location>//note the difference in the other tracks for the "location" tag <title>91</title> <info>http://domain.com/nature.html</info> </track> <track> <annotation>Nature</annotation> <location>http://domain.com/nature3-2.flv</location>//note the difference in the other tracks for the "location" tag <title>91</title> <info>http://domain.com/nature.html</info> </track> <track> <annotation>Nature</annotation> <location>http://domain.com/nature3-3.flv</location>//note the difference in the other tracks for the "location" tag <title>91</title> <info>http://domain.com/nature.html</info> </track> <track> <annotation>Nature</annotation> <location>http://domain.com/nature3-4.flv</location>//note the difference in the other tracks for the "location" tag <title>91</title> <info>http://domain.com/nature.html</info> </track> </trackList> </playlist> That's it, if you can help me out I would be very grateful . (I just need the basic skeleton of this) Thank you
-
Anyone?
-
I guess you're away . Can someone else help me, please?
-
Hellooo
-
Skunk, you there?
-
I'm not sure what you mean...but this is the link that a friend gave me: http://animecongeries.vidiac.com/handlers/SFAsysPlayer_GetData.ashx?playerinfo={ mode:%27stdvideo_from_id%27, video:%274e5eaaba-deed-4e1f-bde6-9b35010174d2
-
Does anyone know?
-
I'm a little lost...I got this from one of the links you gave me: <?php $feed = simplexml_load_file('http://www.sitepoint.com/recent.rdf'); foreach ($feed->item as $item) { $ns_dc = $item->children('http://purl.org/dc/elements/1.1/'); echo $ns_dc->date; } ?> $feed would be replaced by my feed. Then it's saying to take each of the items within the feed and extract the date after the "dc" namespace. However...what does "http://purl.org/dc/elements/1.1/" have to do with anything? That script itself works perfectly...but I don't understand how I should alter it and implement that idea into my script: <?php $allowed_url = array("welcome", //Welcome video "blankspothere"); $passed_url = $_GET['url']; foreach ($allowed_url as $allowed) { if(stristr($allowed, $passed_url) !== false) { $url='http://domain.com/feed-'.$_GET['url']; $sxml = simplexml_load_file($url); list($node) = $sxml->xpath('/rss/ad_spec/selection/channel/playlist/item/sf:mediapath'); header('Location: '.$node['url']); exit; } } header("Location: http://www.google.com/"); ?>
-
Ok...here's the RSS file and also a new code that should work but doesn't (it's a little different from the one that I provided earlier) : <rss version="2.0"> <sf:configuration> <sf:siteurl>http://domain.com/</sf:siteurl> <sf:sitename>Domain</sf:sitename> <sf:font>IMPACT</sf:font> <sf:fontsize>20</sf:fontsize> <sf:logo/> <sf:logoalpha>50</sf:logoalpha> <sf:share>true</sf:share> <sf:upload>true</sf:upload> <sf:borderstyle>0x000000</sf:borderstyle> <sf:backgroundstyle>null</sf:backgroundstyle> <sf:textcolor>0x000000</sf:textcolor> <sf:objectcolor>0x000000</sf:objectcolor> <sf:buttoncolor>0x00cccc</sf:buttoncolor> <sf:backgroundcolor>0x000000</sf:backgroundcolor> <sf:analytics_key>UA-187186-1</sf:analytics_key> <sf:video_analytics_key>123456</sf:video_analytics_key> </sf:configuration> <ad_sys_spec aggregate_views_per_user="10" view_frequency="3"/> <ad_spec id="0" desc="empty" startdate="01012008" enddate="12312020" views_per_user="1000" overlay_provider="OVERLAY_PROVIDER" overlay_channel_id="OVERLAY_CHANNEL_ID"> <selection> <channel> <title> Welcome Video </title> \r <description/> \r <link>http://domain.com/</link> \r − <image> <url>http://domain.com/footer.jpg/url> <link>http://domain.com</link> <title>Welcome</title> <height>41</height> <width>210</width> </image> <language>en-us</language> <pubdate>Sat, 07 Feb 2009 21:37:56 GMT</pubdate> \r <playlist sort="1" orderby="1"> <item> \r <title> Welcome Video </title> \r <author>Admin</author> \r <pubDate>Tue, 14 Oct 2008 15:37:00 GMT</pubDate> \r <link> http://domain.com/welcome.html </link> \r <description> Welcome Video </description> \r <media:text type="html"> Welcome Video<br /><br /><img src="http://domain.com/image.jpg" border="0" /> </media:text> \r <media:player url="http://domain.com/welcome.html"/> \r <media:content url="http://domain.com/player.swf?=" type="application/x-shockwave-flash" medium="video" height="352" width="428" duration="220"/> \r <media:title> Welcome Video </media:title> \r <media:keywords/> \r <media:description> Welcome Video </media:description> \r <media:thumbnail url="http://domain.com/thumb.jpg" height="150" width="200"/> \r <guid isPermaLink="true" url="http://domain.com/" guid="welcome.html"/> \r <sf:kudos curmonth="0" month="0" total="0"/> <sf:avatar> http://domain.com/image.jpg </sf:avatar> \r <sf:mediapath> http://domain.com/welcome.flv </sf:mediapath> \r <sf:mediaid>954392</sf:mediaid> \r <sf:views>3649</sf:views> \r <sf:dateadded_verbose>October 14, 2008</sf:dateadded_verbose> </item> </playlist> \r </channel> </selection> </ad_spec> </rss> And this is the code that should be able to call the contents within "sf:media" ...but I can't get it to work: **Note: http://domain.com/feed-~input~ is the RSS code above--^ <?php $allowed_url = array("welcome", //Welcome video "blankspothere"); $passed_url = $_GET['url']; foreach ($allowed_url as $allowed) { if(stristr($allowed, $passed_url) !== false) { $url='http://domain.com/feed-'.$_GET['url']; $sxml = simplexml_load_file($url); list($node) = $sxml->xpath('/rss/ad_spec/selection/channel/playlist/item/sf:mediapath'); header('Location: '.$node['url']); exit; } } header("Location: http://www.google.com/"); ?> Does this information help?
-
hello?
-
Can someone help me further, please?
-
Does it matter what it's called? Because even though it is invalid it can still be read by other scripts if those scripts use the same tag. Umm...as for the name space thing...the 2 pages you gave me were confusing... Example...what is this? lol: ::= ('"' [^"]* '"') | ("'" [^']* "'")
-
I created it...why?
-
Thanks for the links...I'm not much of a PHP expert so I may have a hard time with it xD I am pulling the contents of sf:media from a file. If anyone else can give me an exact answer...I'd be very thankful . But...I hope those links will do
-
Anyone?
-
Well..."sf:media" is just a tag in a RSS/XML file. <rss> <playlist> <item> <sf:media>Hello World</sf:media> </item> </playlist> </rss> So how can I get it so it doesn't give me the error message?
-
This is part of my code: $node = $sxml->sf:mediapath; But when I run my script, I get an error saying unexpected : for that specific line. Any ideas on how to fix that? (I tried replacing ":" with "%3A" but then I got a T_STRING error)
-
Oh...alright. Can someone move this to the JS forum, please?
-
I tried something with DIV layers and a style code snippet but it didn't work. Anyone know of a way of doing this?
-
Why is this not easily done? Tables do it by using 100% on width + height...why not with images?
-
I made this new website: http://www.top-media.it.tc/ I need to figure out how to make the image fit within all browser dimensions while still keeping the aspect ratio of whatever content I put in there (let's say 1000x1000 lowers to 100x100 if that's the size of the user's browser). Does anyone know the code for this? I tried searching for it for an hour but can't find one
-
[SOLVED] How to call this with simplexml_load?
Graxeon replied to Graxeon's topic in PHP Coding Help
I tried the script but I got this: -
[SOLVED] How to call this with simplexml_load?
Graxeon replied to Graxeon's topic in PHP Coding Help
I'm trying to setup a little "theater" for my Sony PSP. I'm going to be running it from XAMPP or even off of my PSP's memory. Anyways...umm: I got this: Here's a clearer explanation of what I would like the script to do: -I request "file.php?url=140" -"file.php" goes to "http://www.sqweasel.com/flv_player/data/playerConfigEmbed/140.xml" and grabs whatever is in the "path=" of "_video" in that XML file (in this case, it would be the MP3 file). Oh btw...the script needs a "add .xml after the input" -"file.php" then redirects me to that file (so then I can listen to it from my PSP without downloading) If the input isn't in the "allowed URLs" array...then the script redirects the me to "google.com" Does that make more sense? Thanks for taking your time to help me out, btw. P.S. I know...I'm a PSP noob -
[SOLVED] How to call this with simplexml_load?
Graxeon replied to Graxeon's topic in PHP Coding Help
Ok, cool. Umm...can you help me get this script to work? I tried messing around with it but it's no good What I'm trying to do is grab whatever is in "path=" under "_video" from this XML file: http://www.sqweasel.com/flv_player/data/playerConfigEmbed/140.xml **The number "140" can be changed to whatever is in the array <?php $allowed_url = array("8776", //test start "140"); $passed_url = $_GET['url']; //this would be http://www.google.com foreach ($allowed_url as $allowed) { if(stristr($allowed, $passed_url) !== false) { $string = $url='http://www.sqweasel.com/flv_player/data/playerConfigEmbed/'.$_GET['url']; $sxml = new SimpleXmlElement($string); echo($node) getAttribute("path", $sxml->playerConfig[0]->_video[0]) . "<br />"; header('Location: '.$node['url']); exit; } } header("Location: http://www.google.com/"); ?> -
[SOLVED] How to call this with simplexml_load?
Graxeon replied to Graxeon's topic in PHP Coding Help
I'm sorry...but can you use that code with the example that I gave, please? I'm a little confused >.<