Jump to content

harristweed

Members
  • Posts

    346
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by harristweed

  1. I think the problem is this line in XML.class.php

    while ($file_content = fread($fp, 4096)) {

    Best option ditch the class and write a custom parser using php5 and  simplexml_load_file

     

    Else you could try altering the line to

    while ($file_content = fread($fp, 10000)) {

     

    or/and

     

    line 69

    $reference[$name][$this->_levelsNumbering[$i][$name]] =$reference[$name][$this->_levelsNumbering[$i][$name]]. $data;

     

     

  2. two things...first feed dosn't validate, that will break the parser...

     

    http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.newsday.co.tt%2Frss.xml

    Sorry

     

    This feed does not validate.

     

        *

     

          'ascii' codec can't decode byte 0x93 in position 1801: ordinal not in range(128) (maybe a high-bit character?) [help]

     

     

    In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

     

        *

     

          line 38, column 170: description contains bad characters (7 occurrences) [help]

     

              ... g to any of the floors in the building. ?Nobody is allowed to go upstair ...

                                                          ^

     

        *

     

          line 67, column 0: Missing atom:link with rel="self" [help]

     

     

    and secondly, why not parse it the easy way...

      $xml_feed="http://www.newsday.co.tt/rss.xml";
      
      if(!$xml = simplexml_load_file("$xml_feed")){
        $message.="Can't connect to feed $xml_feed";
      }
      foreach ($xml->channel->item as $value){
          $title=$value->title;
          $description=$value->description;
          echo"<p>$title</p>\n";
          echo"<p>$description</p>\n";
          
      }

     

  3. where is the update run?

    mysql_select_db("XXXXX")or die("cannot select DB");
    
    [color=red]"UPDATE qls3_users SET group_id = '9' WHERE $payer_email = 'email'";[/color]  <<<< THIS IS THE BIT THAT DONT SEEM TO WORK
    
           /* END EDITABLE AREA ------------ */
    
           header("location:undefined");
           exit;

     

    I can't see that you have even connected to the database!

          $link_id=mysql_connect("localhost", "XXXXX", "XXXXX")or die("cannot connect");
    
          mysql_select_db("XXXXX")or die("cannot select DB");
    
    $update="UPDATE qls3_users SET group_id = '9' WHERE  email = '$payer_email'";
    
    if(!mysql_query($update,$link_id))
    $error=mysql_error();
    echo $error; // or add to email or wherever you want to show it
    
           /* END EDITABLE AREA ------------ */
    
           header("location:undefined");
           exit;

     

     

  4. <?php
      $date_today=date("l jS M Y");
      echo $date_today."<br />\n";
      $day_1 = mktime(0, 0, 0, date("m"), date("d")+1,   date("Y"));
      $day1=date("l jS M Y",$day_1);
      echo $day1."<br />\n";
      $day_2 = mktime(0, 0, 0, date("m"), date("d")+2,   date("Y"));
      $day2=date("l jS M Y",$day_2);
      echo $day2."<br />\n";
      echo"....<br />\n";
      $day_9 = mktime(0, 0, 0, date("m"), date("d")+9,   date("Y"));
      $day9=date("l jS M Y",$day_9);
      echo $day9."<br />\n";
    ?>
    

  5. I have a new job which is updating a site which was written using Symfony . I have had a brief look at the documentation for Symfony and I’m wondering if going through the pain barrier of learning all about Symfony is worth the effort. Apart from the nightmare of trying to Symfony get it installed on my system.

     

    My question is it worth trying to install, learn Symfony for one not very well paid job?

     

×
×
  • 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.