
businessman332211@hotmail.com
Members-
Content Count
304 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout businessman332211@hotmail.com
-
Rank
Member
- Birthday 12/05/1983
Contact Methods
-
Website URL
http://www.freelancebusinessman.com
-
ICQ
0
Profile Information
-
Location
usa
-
I'm a little confused with some variables...
businessman332211@hotmail.com replied to blackthirteen's topic in PHP
This specifically is probably a function call and not a variable. -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
I see what it output's yes. i understand that part, it's just I am tellign the start handler to find the range that is current. When it find's a match it tell's me what is going on. However if I go to data, I still don't understand how to make it do something like get the data, or something else, when a match is found in the first function. -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
I more of mean, I just don't understand the process. Right now I have the start element echoing got you when a match is found. If I try echoing the data there, in the other, it doesn't echo. <?php$time = strftime("%Y%m%d%H%M%S%");function startElement($parser, $name, $att='') { global $time; global $open_tags; global $current_tag; $current_tag = $name; $start = strftime($att['START']); $stop = strftime($att['STOP']); if ($start < $time && $stop > $time) { } if ($format = $open_tags[$name]){ switch($name){ case 'PROGRAMME': break; } }} -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
<?php// Build an array with all the channel names.$channels = array ("I11187", "I11829", "I11269", "I11768", "I11993", "I19556", "I11490", "I11479", "I11959", "I23319", "I18774", "I11287", "I12553", "I24634", "I23324", "I22564", "I23327", "I23328", "I23329", "I10240", "I10244", "I10241", "I18429", "I16585", "I24553", "I10243", "I10021", "I12852", "I16374", "I10142", "I10145", "I10139", "I10161", -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
<?php// Build an array with all the channel names.$channels = array ("I11187", "I11829", "I11269", "I11768", "I11993", "I19556", "I11490", "I11479", "I11959", "I23319", "I18774", "I11287", "I12553", "I24634", "I23324", "I22564", "I23327", "I23328", "I23329", "I10240", "I10244", "I10241", "I18429", "I16585", "I24553", "I10243", "I10021", "I12852", "I16374", "I10142", "I10145", "I10139", "I10161", -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
Ok, based on what you said I am goign to study some more tonight.Tomorrow I will try to pull all this together in my program, maybe you can help me out again if I get stuck, I knew I could count on you, everytime I have really needed help you were there to give me guidance.Thanks so far, for the help, let me soak some of this in, and put together what I can. -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
Ok, here is my full program right now. <?php// Build an array with all the channel names.$channels = array ("I11187", "I11829", "I11269", "I11768", "I11993", "I19556", "I11490", "I11479", "I11959", "I23319", "I18774", "I11287", "I12553", "I24634", "I23324", "I22564", "I23327", "I23328", "I23329", "I10240", "I10244", "I10241", "I18429", "I16585", "I24553", "I10243", "I10021", "I12852", "I16374", "I10142", "I10145" -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
That code there probably doesn't work fully, I made some changes to it, when I change it back, the data is the data in between the tag's.What it does is run through the xml until it get's to the first open element, it runs the open function, then it takes care of finding the ending element, and loads the ending funciton, then loads the data function to handle data in between. starts at the next element and cycles through them again, I know how to feed it end tag's, start tag's, how to get the data. However I don't know how to factor in attributes, or how to format them when I put them in. -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
// Functions To go into the element handlers, later on// variables to pass to user functions// function to start searchingfunction startElement($parser, $name, $attrs='') {global $open_tags;$current_tag = $name;if ($format = $open_tags[$name]){switch($name){case 'programme':$a = "0";break;default:break;}}}// function to end searchingfunction endElement($parser, $name, $attrs='') {global $close_tags;if ($format = $close_tags[$name]){switch($name){case 'programme':$a = "1";break;}}}// function to take data from tagsfunction tagData($parser, $data) {global $current_tagswitch($current_tag){case 'p -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
THANK YOU, I have been trying to get help on this forever. I know somebody would pay attention to me. Yes there is something I need to figure out, I have the whole script done up to a point.Here is my current code.Based on the layout of the xml file's shown aboveHere is my current program <?php// Build an array with all the channel names.$channels = array ("I11187", "I11829", "I11269", "I11768", "I11993", "I19556", "I11490", "I11479", "I11959", "I23319", "I18774", "I11287", "I12553", "I24634", "I23324", -
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
I revised some of my code, and made some changes, but there are still a few things I don't understand.That helps me to find the program tag.However the programme has 2 attributes <programme start="20070128230000 -0500" stop="20070129003000 -0500" channel="I45654.labs.zap2it.com">I need to also check the start/stop each time around.I need to do calculations, then when it finds one that matches what would be what is currently playing, I need it to get the title, adn sub-title. And save it in an array, so I can get to it later.below is what my new code looks like, after some more reading. -
mod_rewrite
-
PHP + XML = Parsing
businessman332211@hotmail.com replied to businessman332211@hotmail.com's topic in PHP
Ok, I have discovered some things. For one, I looked at my previous question, I figured that out.I am 100% amazed at the power of the Expat library. I dug into it, and got a skeleton that actually worked, and did some playing with it, so I was able to single out a couple of specific questions, I need some advice on. Here is my code for example.Example XML File <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE tv SYSTEM "xmltv.dtd"><tv source-info-url="http://labs.zap2it.com/" source-info-name="TMS Data Direct Service" generator-info-name="XMLTV" generator-info-url="http:/ -
Ok, I went through about 8 tutorials, and got something together. When I had a bunch of error's I didn't understand what was going on, after a lot of reading and lot of tutorials I was able to form something that works, atleast for basic parsing.The situation is a little hard to explain, I have a client getting xml file's from zap2it and he saved them on his server daily. The main file is menu.xml, everything with it is already taken care of. In menu.xml it has information on all the television channels. Then each channel has there own xml file's that get updated daily. I needed a way to
-
I am Joyel Puryear, own of http://www.freelancebusinessman.comI do freelance web development (programming, coding, design, and misc) related web work.I come to the forums to ask help on advice sometimes with different aspects of coding, programming, sometimes misc stuff, because sometimes i get stuck, need a helping hand.