Jump to content

cnl83

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Posts posted by cnl83

  1. If you goto http://www.actionfx.net/bfd/photos.php you will see that im trying to show an rss feed from http://picasaweb.google.com/data/feed/base/user/114565750484201639035?alt=rss&kind=album&hl=en_US&access=public

     

    My code works well if its just text on the rss but it does not work on this particular rss. I want the photos to show up on my page also. Im hoping someone here can be so kind to help me out with this coding. Below is my code.

    <?php  
    
    $feed_url = "http://picasaweb.google.com/data/feed/base/user/114565750484201639035?alt=rss&kind=album&hl=en_US&access=public";
    
    // INITIATE CURL. 
    $curl = curl_init(); 
    
    // CURL SETTINGS. 
    curl_setopt($curl, CURLOPT_URL,"$feed_url"); 
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); 
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0); 
    
    // GRAB THE XML FILE. 
    $xmlTwitter = curl_exec($curl); 
    
    curl_close($curl); 
    
    // SET UP XML OBJECT.
    // Use either one of these, depending on revision of PHP.
    // Comment-out the line you are not using.
    //$xml = new SimpleXMLElement($xmlTwitter);
    $xml = simplexml_load_string($xmlTwitter); 
    
    // How many items to display 
    $count = 10; 
    
    // How many characters from each item 
    // 0 (zero) will show them all. 
    $char = 100; 
    
    foreach ($xml->channel->item as $item) { 
    if($char == 0){ 
    $newstring = $item->description; 
    } 
    else{ 
    $newstring = substr($item->description, 0, $char); 
    } 
    if($count > 0){ 
    //in case they have non-closed italics or bold, etc ... 
    echo"</i></b></u></a>\n"; 
    echo" 
    <div style='font-family:verdana; font-size:.12;'>  
    <b>{$item->title}</b><br />
    $newstring ...  <span class='redlink' id='redlink' style='redlink'> <a href='{$item->guid}'>read more</a> </span>
    <br /><br /> 
    </div> 
    ";  
    } 
    $count--; 
    }  
    ?> 

  2. Im using dreamweaver, and I have a simple list menu that is linked to a dynamic source in my database. I cannot figure out how to create an action when they select something from the list menu. I suppose that it would have to be passed through the browser somehow. Im not very code fluent, but I try. If you know to accomplish this using dreamweaver cs4 or hard coding, I would appreciate it.

     

    I want this: When you click on an item it will bring up all the data pertaining to that particular record.

     

    My code:

          
    <form id="form1" name="form1" method="post" action="">
            <label for="customerlist">Select your customers</label>
            <p><label for="customers"></label>
        <select name="customers" id="customers">
                <option value="None">None</option>
                <?php
    do {  
    ?>
                <option value="<?php echo $row_Customers['name']?>"><?php echo $row_Customers['name']?></option>
                <?php
    } while ($row_Customers = mysql_fetch_assoc($Customers));
      $rows = mysql_num_rows($Customers);
      if($rows > 0) {
          mysql_data_seek($Customers, 0);
      $row_Customers = mysql_fetch_assoc($Customers);
      }
    ?>
              </select>
              <input type="submit" name="Go" id="Go" value="Go" />

  3. I have a file management system in place already. There is a page to upload files. This page uploads into the directory you are in, and I just want to make a drop down menu to specify which folder/directory you want to upload. It will probably take 1-2 hours to complete. I need this done asap, and either I mail you a check or pay through paypal.

     

    PM me your phone number so we can get this wrapped up.

  4. I have a some news that im loading into a cell. You can see the actual page here. (take a look at the section towards the bottom that says CHADS TEST). http://www.poshinteriors.com/09/news/

     

    I only want to be able to display no more than 250 Characters. Does anyone know a nifty way to do this in a cell?

     

        <td height="110"></td>
        <td colspan="2" rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="imported/news.gif">
          <!--DWLayoutTable-->
          <tr>
            <td width="32" height="38"> </td>
            <td width="258"> </td>
            <td width="11"> </td>
          </tr>
          <tr>
            <td height="89"> </td>
            <td valign="top"><p align="left"><?php
    include_once( dirname(__FILE__) . '/fastnews-code.php' );
    $fn = new fastNews();
    echo $fn->display();
    ?></a> </p></td>
              <td> </td>
          </tr>
          
        </table></td>

  5. Here is the php info on the server im using http://www.allsaidaudiosolutions.com/test.php

    The problem I have is that my form doesnt work. I cant figure out why it would not. It works on every other server ive used it on.

     

    PHP

    <?  
    // Enter your contact email address here
    $adminaddress = "myaddy"; 
    
    // Enter the address of your website here include http://www. 
    $siteaddress ="myaddy"; 
    
    // Enter your company name or site name here 
    $sitename = "All said audio solutions"; 
    
    /*******************************************************
    
    No need to change anything below ... 
    
    *******************************************************/
    
    // Gets the date and time from your server
    $date = date("m/d/Y H:i:s");
    
    // Gets the IP Address
    if ($REMOTE_ADDR == "") $ip = "no ip";
    else $ip = getHostByAddr($REMOTE_ADDR);
    
    //Process the form data!
    // and send the information collected in the Flash form to Your nominated email address
    if ($action != ""): 
    mail("$adminaddress","Web email form", 
    "A visitor at $sitename has left the following information\n
    Name: $fname 
    Organization: $organization
    Department: $department
    Email: $email
    Telephone: $telno\n
    City & State: $city
    Budget: $state
    
    
    Project and Budget:
    ------------------------------
    $comments
    
    Logged Info :
    ------------------------------
    Using: $HTTP_USER_AGENT
    Hostname: $ip
    IP address: $REMOTE_ADDR
    Date/Time:  $date","FROM:$adminaddress"); 
    
    //This sends a confirmation to your visitor
    mail("$email","Thank You for visiting $sitename", 
    "Hi $fname,\n
    Thank you for your interest in $sitename!
    $siteaddress","FROM:$adminaddress"); 
    
    //Confirmation is sent back to the Flash form that the process is complete
    $sendresult = "Thank you for visiting <a href = \"$siteaddress\" target = \"_blank\"><u>$sitename</u></a>. You will receive a confirmation email shortly. ";
    $send_answer = "answer=";
    $send_answer .= rawurlencode($sendresult);
    echo "$send_answer";
    
    endif;
    
    ?>
    
    

  6. I uploaded this small app to my server, and it works fine. I uploaded to my customers server, and it does not work. Im not sure what to ask the host to turn on or off. Maybe someone here has had this problem.

     

    Here is the error

    Warning: copy(/home/content/k/e/v/kevinandjeff/html/allsaidaudiosolutions/uploads/uploads/): failed to open stream: Is a directory in /home/content/k/e/v/kevinandjeff/html/allsaidaudiosolutions/uploads/upload.php on line 18

     

    Here is PHP

    <?php
    
    $path = dirname($_SERVER['SCRIPT_FILENAME']) . "/uploads";
    
    //If we are sending a file.
    if(isset($_FILES['file']) == true)
    {
    //Change scope of file var.
    $file = $_FILES['file'];
    //Down below after the code $path  is where you add 
    //to the name of the image such as imagespotlight
    if(copy($_FILES['file']['tmp_name'], $path . "/" . $file_name) == true)
    {
    	//Create a linker thing! Also is where the link is actually put out.
    	//In order to give correct link you have to be in concert with the above statement like
    	//spotlight --> then the actual jpg, but you have to add spotlight so the link can be correct.
    	$file_url = "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/uploads/" . $file_name;
    
    	//Create a good message!
    	$message = "<font color=\"green\">Your {$kbsize}KB file named <i>$file_name</i> was uploaded successfully.</font><br>\n"
    		. "<b>File <a href=\"" . $file_url . "\">Link:</a></b><br>\n"
    		. "<textarea readonly cols=\"50\" rows=\"1\">" . $file_url .  "</textarea>\n";
    
    //If the copy fails.
    }
    else
    {
    	//Create error message!
    	$message = "<font color=\"#990000\">Error - Your  file named <i>$file_name</i> was not uploaded successfully.</font>";
    }
    
    //Unlink the temp file.
    unlink($_FILES['file']['tmp_name']);
    }
    
    //Output message.
    echo $message;
    ?>

  7. Ok, the page protect function is my class file, but im not sure I have the redirect code right.

    [code]

    require ('/home/apex/scormsource-www/'."/classes/access_user/access_user_class.php");
    session_start();
    $sid = $_SESSION['name'];

    $page_protect = new Access_user;
    $page_protect->access_page(); // only set this this method to protect your page

    if (isset($_GET['action']) && $_GET['action'] == "log_out") {
    $page_protect->log_out(); // the method to log off
    }
    //THIS IS WHERE IM HAVING PROBLEMS. IT DOES NOT SEEM TO WORK.
    if ($page_protect->access_level >= RESTRICTED_ACCESSPROGRAM_LEVEL)
    {
    header("location: authenticatedaccessthree.php");
    }
    //END
    [/code]
  8. Im having issues passing my variables via url.

    Here is my code in the main php file..
    [code]
    session_start();
    $sid = $_SESSION['name'];

    ?>

    later on in the page

    <a href="https://dataencrypted.com/scormsource/classes/access_user/read.php?<?=$sid?>
    [/code]

    and that works cause when you click the link it renders my name like this
    [a href=\"https://dataencrypted.com/scormsource/classes/access_user/read.php?Chad%20Landry\" target=\"_blank\"]https://dataencrypted.com/scormsource/class...p?Chad%20Landry[/a]

    My code in read.php is

    [code]
    session_start();

    $val = $_GET['sid'];

    print "HI: $val";

    ?>
    [/code]
    I cannot get it to print $val

    Thanks in advnaced[code][code]
  9. Can anyone tell me how to pass variables from HTTPS to HTTP...

    Im using this:

    from:
    [a href=\"https://dataencrypted.com/scormsource/classes/access_user/authenticated.php\" target=\"_blank\"]https://dataencrypted.com/scormsource/class...thenticated.php[/a]

    to:
    [a href=\"http://www.scormsource.com/classes/access_user/read.php?PHPSESSID=<?=$PHPSESSID?>\" target=\"_blank\"]http://www.scormsource.com/classes/access_...;PHPSESSID?>[/a]

    Im getting this error

    Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/apex/scormsource-www/classes/access_user/access_user_class.php on line 24

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/apex/scormsource-www/classes/access_user/access_user_class.php:24) in /home/apex/scormsource-www/classes/access_user/access_user_class.php on line 24
    &real_name=&levelFive=0
    Warning: Unknown(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in Unknown on line 0

    Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
  10. [!--quoteo(post=355124:date=Mar 14 2006, 11:27 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 14 2006, 11:27 PM) [snapback]355124[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    change

    [code]$query = "SELECT * FROM users";[/code]

    to

    [code]$query = "SELECT * FROM users WHERE login = '<userlogin>' ";[/code]
    [/quote]


    Ok thanks...where are you getting <userlogin>?
×
×
  • 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.