Sorry, I got this far and had to stop. $count?? The getlisting.php may contain some paragraphs with urls, but this isn't made clear. You seem to re-assign your variables with different datatypes, which can be difficult to follow.
$errmsg_arr = array();
$errflag = false;
// convert spaces to '-', remove characters that are not alphanumeric
// or a '-', combine multiple dashes (i.e., '---') into one dash '-'.
$str = ereg_replace("[-]+", "-", ereg_replace("[^a-z0-9-]", "",
strtolower( str_replace(" ", "-", $str) ) ) );
function getPaddedHour($hour, $meridian)
$ret = intval($hour);
$ret += ($meridian == 'AM') ? 0 : 11;
$xml = '< ' .'?xml version="1.0" encoding="UTF-8" ?' .'>';
$xml .= '<tv generator-info-name="www.testbox.elementfx.com/test">';
$base1 = "http://www.mysite.com/get-listing.php";
$html = file_get_html($base1);
foreach($html->find('p[id=links]') as $element)
//$count is not encountered elsewhere - so should throw an error
$program_list[$count] = array();
$id_split = explode("?", $element->plaintext);
//You've just OVERWRITTEN the $id_split array with the following explode
$id_split = explode("&", $link_split);
//Is $channels now a single value or an array? Confusing - assuming single
$channels = explode("channels=",$id_split);
$channels = $channels;
//Is $id a single value or an array? Assuming single
$id = explode("id=",$id_split);
$id = $id;
There's a lot of conditionals too, so you could get rid of a lot of it with this:
However, this is not quite right as you only allow AM to enter this branch. You've created a getPaddedHour() function, but haven't used it.
Without wanting to sound too critical, this is a mess and it will take some work to clean it up. I'd suggest that you try to cut all those needless conditionals and create reusable functions (as exeplified).
I can't get my head around 500+ lines of code, and it seems few other people can judging by the lack of response thus far. You have a lot of needless code here. I'll see if I can reduce it and perhpas it'll be more digestable :)
I have now tried and tried several times to make sure that it really doesent work before I ask again.
I remember you told me that I have to use mysqli instead just myaql.
And that is exaktly the error in it all.
whenever I use mysqli, my website just go blank and I recieve an error message saying: Access denied for user ''@'web103.local.one.com' (using password: NO).
So I think that I cannot get your code to work because it is written with mysqli_queries.
hello, i am having the same issue, i am not able to load data in wdcalendar. i have read the conversation, this wdcalendar is working fine in localhost but not working in the server. Please help me out....
I found it.
I'd just like to point out that there's a syntax error here: you omitted the terminating parenthesis. I would also recommend, if this file is critical to your application, you use the require_once() function instead.
I have been trying to work around a problem but am not having much luck.
I have classes that include a file with my db settings. The problem is I have a functions directory that calls some of the classes. I get failed to open stream: No such file or directory. Is there a way to include this file no matter where the class is being called from?