Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. I really like go daddy hosting, however I think there registrar service should go to hell, IF they are "wild-west domains.com" I had an account with www.bluehost.com they said there registrar wildwestdomains.com (aka: godaddy.com) which they addressed it at everytime I spoke with them gave me problems. If www.wildwestdomains.com is the same registrar of go-daddy, I hate them. There hosting however is very good, I have had many clients that used go-daddy, I always had an easy time getting stuff done, adn getting in touch with them. They may have just been busy the time you tried to get help on something (a lot of business going at once or something).
  2. Still not working. I am trying to get the current time (which is time), and run the calculations to find out which one is which. However it's not coming back with the message, I don't understand if my calculations are wrong, or if it's something else not going right. So that would be proper calculations to find out. Based on the start time and stop time having "20070201141500 -0500" this format.  I use the following code [code]<?php $time = strtotime("%Y%m%d%H%M"); function startElement($parser, $name, $att='') { global $open_tags; global $current_tag; $current_tag = $name; if ($att['START'] < $time && $att['STOP'] > $time) { echo "Got you"; } if ($format = $open_tags[$name]){         switch($name){             case 'PROGRAMME':             break;         }     } } ?>[/code] I am 100% sure that the att start and stop have the proper information I echo'd them out, I just need it to find the one that matches the start/stop time.
  3. I ran into a problem, I was trying something specific to get the date checked.  Here is what I tried Based on hte above formate I showed you [code]<?php $time = strftime("%Y%m%d%H%M"); if ($att['START'] < $time && $att['STOP'] > $time) { echo "Got you"; } ?> [/code] In this situation $att['START'] holds the start time and $att['STOP'] holds the stop time, in the format that I presented to you a minute ago.  I don't think it's possible in this specific situation for me to be able to change the format in order to test.  I was hoping to change the $time to match that of that format, so I can compare them. This is not working, is there something I am doing wrong, or would this be proper.  If this is the proper way to do it, then chances are it's something else messing up and not the calculations.  Can someone help me with this real quick?
  4. I don't know much about this, but after looking on google. http://www.google.com/search?hl=en&q=free+partition+recovery+software&btnG=Google+Search THere are a few you can find for free, however since I don't know much about it, maybe it would be best to pay money for one. THere are a few I saw on there that were free, like 4-5 down the list.
  5. Don't ever use system, unless it's absolutely contained. YOU need either require, require_once, include, or include_once.
  6. [quote]Sorry, that was my lack of reading. After reviewing mktime, it seem's it will handle everything like that behind the scenes. Thank you for the advice.[/quote] I had replied up there, it was a misreading, I understood it after re-reading the replies.
  7. Ok, thanks.  As far as the info, it could be just my computer.  The error's wouldn't work because hte page never loads.  It stays on the current page, doesn't change over to the info page, or tries to load it over, and over again without ever showing anything. I said to hell with it, I have the server, the info page halfway works, that's good enough for me as a testing enviroment.
  8. 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 [code] <?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://www.xmltv.org/">   <channel id="I45654.labs.zap2it.com">     <display-name>52 ESPNU</display-name>     <display-name>52 ESPNU GA60311:-</display-name>     <display-name>52</display-name>     <display-name>ESPNU</display-name>     <display-name>ESPN University</display-name>     <display-name>Sports Satellite</display-name>   </channel>   <programme start="20070128230000 -0500" stop="20070129003000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">Women's College Basketball</title>     <sub-title lang="en">Michigan State at Rutgers</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP184406.0000</episode-num>     <subtitles type="teletext" />   </programme>   <programme start="20070129003000 -0500" stop="20070129020000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">Women's College Basketball</title>     <sub-title lang="en">North Carolina at Maryland</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP185707.0000</episode-num>     <subtitles type="teletext" />   </programme>   <programme start="20070129020000 -0500" stop="20070129033000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">High-School Basketball</title>     <sub-title lang="en">St. John's (D.C.) vs. Mount St. Joseph's (Md.)</sub-title>     <date>20070127</date>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <category lang="en">Series</category>     <episode-num system="dd_progid">EP800174.1088</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129033000 -0500" stop="20070129050000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">High-School Basketball</title>     <sub-title lang="en">Dematha (Md.) vs. Towson Catholic (Md.)</sub-title>     <date>20070127</date>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <category lang="en">Series</category>     <episode-num system="dd_progid">EP800174.1089</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129050000 -0500" stop="20070129060000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">Who's Number 1?</title>     <sub-title lang="en">Greatest College Basketball Players</sub-title>     <date>20070115</date>     <category lang="en">Sports non-event</category>     <category lang="en">Limited Series</category>     <episode-num system="dd_progid">EP733145.0046</episode-num>     <episode-num system="onscreen">07004</episode-num>   </programme>   <programme start="20070129060000 -0500" stop="20070129073000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">College Basketball</title>     <sub-title lang="en">Syracuse at Louisville</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP185446.0000</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129073000 -0500" stop="20070129090000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">High-School Basketball</title>     <sub-title lang="en">St. John's (D.C.) vs. Mount St. Joseph's (Md.)</sub-title>     <date>20070127</date>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <category lang="en">Series</category>     <episode-num system="dd_progid">EP800174.1088</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129090000 -0500" stop="20070129103000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">High-School Basketball</title>     <sub-title lang="en">Dematha (Md.) vs. Towson Catholic (Md.)</sub-title>     <date>20070127</date>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <category lang="en">Series</category>     <episode-num system="dd_progid">EP800174.1089</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129103000 -0500" stop="20070129120000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">Women's College Basketball</title>     <sub-title lang="en">North Carolina at Maryland</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP185707.0000</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129120000 -0500" stop="20070129123000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">Bill Self Show</title>     <desc lang="en">Head coach Bill Self discusses the week in Kansas basketball.</desc>     <category lang="en">Sports talk</category>     <category lang="en">Basketball</category>     <category lang="en">Limited Series</category>     <episode-num system="dd_progid">SH796411.0000</episode-num>   </programme>   <programme start="20070129123000 -0500" stop="20070129143000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">College Hockey</title>     <sub-title lang="en">Holy Cross vs. Quinnipiac</sub-title>     <desc lang="en">From the TD Banknorth Sports Center in Hamden, Conn.</desc>     <date>20070128</date>     <category lang="en">Sports event</category>     <category lang="en">Hockey</category>     <category lang="en">Series</category>     <episode-num system="dd_progid">EP047985.0934</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129143000 -0500" stop="20070129160000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">College Basketball</title>     <sub-title lang="en">Syracuse at Louisville</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP185446.0000</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129160000 -0500" stop="20070129173000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">College Basketball</title>     <sub-title lang="en">Michigan State at Ohio State</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP185706.0000</episode-num>     <previously-shown />     <subtitles type="teletext" />   </programme>   <programme start="20070129173000 -0500" stop="20070129180000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">ESPNU Recruiting Insider</title>     <desc lang="en">Analysts discuss top high-school prospects and their college choices.</desc>     <category lang="en">Sports talk</category>     <category lang="en">Football</category>     <category lang="en">Special</category>     <episode-num system="dd_progid">SH855565.0000</episode-num>   </programme>   <programme start="20070129180000 -0500" stop="20070129190000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">ESPNU Bracketbusters Selection Show</title>     <category lang="en">Sports non-event</category>     <category lang="en">Basketball</category>     <category lang="en">Special</category>     <episode-num system="dd_progid">SH894959.0000</episode-num>   </programme>   <programme start="20070129190000 -0500" stop="20070129210000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">College Basketball</title>     <sub-title lang="en">Hampton at North Carolina A&amp;T</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP185899.0000</episode-num>   </programme>   <programme start="20070129210000 -0500" stop="20070129230000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">College Basketball</title>     <sub-title lang="en">Mississippi Valley State at Grambling State</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP185900.0000</episode-num>     <subtitles type="teletext" />   </programme>   <programme start="20070129230000 -0500" stop="20070130010000 -0500" channel="I45654.labs.zap2it.com">     <title lang="en">College Basketball</title>     <sub-title lang="en">Pepperdine at Santa Clara</sub-title>     <category lang="en">Sports event</category>     <category lang="en">Basketball</category>     <episode-num system="dd_progid">SP185901.0000</episode-num>     <subtitles type="teletext" />   </programme> </tv> [/code] PHP File [code]<?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",   "I10162",   "I10035",   "I10057",   "I10051",   "I10153",   "I11097",   "I11163",   "I11164",   "I11207",   "I10149",   "I10989",   "I14321",   "I14909",   "I10918",   "I16409",   "I45654",   "I10179",   "I12444",   "I16485",   "I12410",   "I14899",   "I14776",   "I16011",   "I20789",   "I10986",   "I16361",   "I10138",   "I11218",   "I44228",   "I11180",   "I16331",   "I11150",   "I16615",   "I18327",   "I16617",   "I16618",   "I18284",   "I16616",   "I18544",   "I18179",   "I11158",   "I14902",   "I14771",   "I12574",   "I26784",   "I10093",   "I12131",   "I10171",   "I11006",   "I16123",   "I30103",   "I21450",   "I19059",   "I18332",   "I25354",   "I31634",   "I19283",   "I18644",   "I21852",   "I21063",   "I24935",   "I24248",   "I29323",   "I28452",   "I12324",   "I16345",   "I10239",   "I11118",   "I15377",   "I27773",   "I19247",   "I18715",   "I19979",   "I25238");   // Build the file name's dynamically based on the above file names. // register empty array to hold the upcoming information $files = array(); // run through all the channels, assining there full file names into an array foreach ($channels as $k) { $files[] = $k . ".labs.zap2it.com.xml"; // assign each file name into the files array } // attempt to create an xml parser if (!$parser = xml_parser_create()) { exit("There was a problem creating the parser"); } // Functions To go into the element handlers, later on // variables to pass to user functions // function to start searching function starttag($parser, $element_name, $attributes) { case } // function to end searching function endtag($parser, $element_name) { } // function to take data from tags function tagdata($parser, $data) { echo $data; echo "<br />"; } xml_set_element_handler($parser, "starttag", "endtag"); xml_set_character_data_handler($parser, "tagdata"); // use the file array created earlier to get to work // create an array to hold information on all the currently playing shows // from all the xml file's $nowplaying = array(); //foreach ($files as $k => $v) { // run through all the file's echo "Start File"; echo "<br />"; echo "<br />"; if (!$open = fopen("I10021.labs.zap2it.com.xml", "r")) { // opening them // we can't do anything if any file's didn't open, because we don't have all the // necessary data, so kill the script exit("File could not be opened"); } while ($data = fread($open, 4096)){   if (!xml_parse($parser, $data, feof($open))) {       $reason = xml_error_string(xml_get_error_code($parser));       $reason .= xml_get_current_line_number($parser);       die($reason);   } } echo "End File"; echo "<br />"; echo "<br />"; //}// close foreach ?>[/code] [b]Notes[/b] * There are a total of 100+ files * I need to run through them in a foreach I am not to that step, and I am trying to do something else (get an understanding of how the basic structure works) I understand this, but here are my questions. 1. I understand how to set a foreach for the start tag, and do what is necessary for that, how does the start tag, understand what is happening on the data.  I don't understand there relationship. For example, I need to tell it at the start tag, to do this, this, and this to the data.  How do I tell it to do that, since the data function is seperate? 2. I need to find the starttime/stoptime of each programmer.  Even when I dump all the data, the start/stop time doesn't come up.  How do I, or what can I change with my code, to give me access to that information so I can test the proper calculations? 3. I don't understand what is happening when I put it in a foreach.  Doing it this way I have something to work with.  However when I throw a foreach around it using the file names in the array, it doesn't work.  It goes through file one, starts up the second file, and put's out a message that says everything else is junk (something php throws out), then stops anything else from happening.  How can I get a foreach loop to work around this once I get it doing exactly what I want on the first file? Thank you for the help.
  9. Ah ok, I understand now.  I also see that it's not too much harder programming with notices than without, so from now on I will try to accomodate for that.  Thank you for the advice.
  10. [quote]1. Declare all variables. 2. Code more carefully.[/quote] Thank you [quote author=Orio link=topic=124876.msg518072#msg518072 date=1170258992] isset() prevents a lot of work, when dealing with variables that you are not sure they are set. Example: [code]if ($_SESSION['logged'] == "yes") //may give a notice if $_SESSION['logged'] is not set if (isset($_SESSION['logged']) && $_SESSION['logged'] == "yes") //no notice[/code] Another thing that causes lots of notices is when you don't quote array's keys. PHP looks for a constant with that name and if it's not found it understands what you meant and throws a notice. Example: [code]echo $_SESSION[username]; //Notice: Use of undefined constant username in <...> assumed 'username'. echo $_SESSION['username']; //no notice[/code] Other notices can prevent situations like the one I've described- misspells etc'. Orio. [/quote] Ok, there is one thing that strikes me as odd here, then I will mark it as solved. In that example above, you showed my copy first.  That would throw errors, then you showed the other copy, which wouldn't throw errors.  When I look at it, it's the same thing. [code]if ($_SESSION['logged'] == "yes") //may give a notice if $_SESSION['logged'] is not set if (isset($_SESSION['logged']) && $_SESSION['logged'] == "yes") //no notice[/code] In your example, it is doing the same thing the upper one is doing, except you have isset testing first.  WHat is different about this that prevents an error.  Is it that php picks up that you first tested for isset, then tested for the session value.  In the same if, so it stops the error from coming up?
  11. Ok, I have one problem though.  I always do stuff like what I showed you for logins.  What tips can I keep in mind to really help me start programming without getting notices.  Right now if I turned any of my site's on error reporting all, I would get a lot of error's.  Last time I Tried dealing with some, I spent hours, trying to figure out what was wrong, until I just turned it off.  Any advice on making a clean change from programming with notices, to programming without notices?
  12. Ok, I guess then it's highly subject to opinion.  I like using them, but I am going to have to fix them for this purpose.  Thanks for the advice.
  13. I had an older client of mine (I created a site for, in place of his boss.  He was actually supposed to be building it).  He came to me, and told me that his programmer is complaining of using error reporting to turn off Notices.  Notices are something that are a natural part of programming, I get notices for just using [code] <?php if ($_SESSION['logged'] == "yes") ?> [/code] To test if someone is logged in.  Are getting notices good/bad, does someone have a few links on why it is good/bad, and how a program with them all over the place can be fixed.  I always program with it off, because it annoys me, where I read different areas on Google, they are not something to worry about.  I have also heard they are no worse than the warnings you get in CSS, which I have started ignoring over time.  So in this specific post I have two questions actually, they are: Are PHP warnings good or bad? Do you have any type of proof (Link/Tutorial) that backs up the ideas of it being good/bad and why? Thank you for all the advice.
  14. I am going to have series of general questions on PHP/XML parsing so I was going to keep it all in one thread here.  I am currently trying the Expat library in PHP to parse the xml (or trying to).  I have recently looked up about SimpleXML and I tried to look for it in my info page.  Below is some information from my INI file pertaining to XML: [quote]xml XML Support active XML Namespace Support active EXPAT Version 1.95.6 xmlrpc core library version xmlrpc-epi v. 0.51 php extension version 0.51 author Dan Libby homepage http://xmlrpc-epi.sourceforge.net open sourced by Epinions.com xslt XSLT support enabled Backend Sablotron Sablotron Version 0.97[/quote] I am under the impression, by looking at the information below that I do not have SimpleXML on this server.  What exactly is XMLRPC is that the library I am looking for.  This is the first question I had, I am working on the one with the Expat now, I am going to have question's later, probably quite a few so instead of starting multiple threads, I will keep it all into one thread.  So my question is based on showing the above information from my INI file, does it have support for SimpleXML?
  15. Yes, I will do that.  Thanks for the feedback, when I find something tomorrow I will post it here.
  16. I need to look and see if I can find some reference material on the internet that will tell me what the ini_set () function supports.  Based on the php.net manual, anything that is listed as those 2 type's are editable by the ini_set () function.  Is there a better resource that I can find that will make sure I know which one's it affects, and does not affect.  Do you have any feedback, on any possible good resources to find that information out definitely?
  17. I really appreciate the effort. If you really took all the time out to put togehter that guide for IIS, I thought that was a very nice thing to do, thank you. As far as apache.  I am sure I am installing apache correctly.  I am also sure mysql, and hte other was installed. I am just confused as to what is going on. After hours of googling I found one thing on there, that someone had the same problem, he started a post about in a forum.  He never came back to the post.  Everything else work's, everything run's perfectly.  PHP run's fine, but before it just wouldn't go to the info page.  Now if I go via https://localhost then it finally come's up with about 60% of the php page.
  18. I agree with teh comment above, that is very dangerous.  For the site itself, it looks nice.
  19. I think with a little coloring it wouldn't look bad at all.
  20. Hmm, thanks for the productive advice, that got things rolling.  Anyone else? Thanks again.
  21. Yes, he is right. The format you have, is what you use when using something like SELECT.  Insert has a different way of doing it, as he showed you. You would do something like what you did if you were using UPDATE or something else.
  22. Looking here [url=http://us2.php.net/manual/en/ini.php#ini.list]http://us2.php.net/manual/en/ini.php#ini.list[/url] as well as the main page in the manual that talks about ini set you can set anything that has the values of [quote]PHP_INI_ALL or PHP_INI_USER[/quote] What my current problem is, I don't see ini_set actually working. Does it really change register globals to off, if you don't have ini access. At the reference manual it says I can turn off magick quotes.  Is this correct, because when I ran iniset before I end up still getting the slashes added during development.
  23. Yes, I basically need to run a foreach through the xml file's (each one) and pull the now playing, I can't figure out how to do that, using the expat library, I have been working on it end of last week, and this week.
  24. Even then it's only loading half the info page, it's loading all the way up to ftp, sometimes it get's half of gd, then that's it. I am starting to wonder if it's just my computer.
  25. That is strange. I went to https://localhost and it worked. What is going on, was this the problem the entire time. As soon as I changed it over to https, the thing worked entirely, flawlessly. Why was that giving me so many problems this whole time. Would that have fixed it when I did wamp, and hte manual install, I don't understand this at all.
×
×
  • 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.