User Profile

Collapse

Profile Sidebar

Collapse
pedjasmek
pedjasmek
Last Activity: Dec 26 '07, 10:53 PM
Joined: Oct 25 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • pedjasmek
    started a topic Sending email using PEAR
    in PHP

    Sending email using PEAR

    I'm using this code:
    [code=php]
    <?php
    require_once "Mail.php";

    $from ="__MUNGED__ ";
    $to = "__MUNGED__ ";
    $subject = "Hi!";
    $body = "Hi,\n\nHow are you?";

    $host = "__MUNGED__ ";
    $username = "pedjasmek" ;
    $password = "********";

    $headers = array ('From' => $from,
    ...
    See more | Go to post
    Last edited by pbmods; Jan 2 '08, 03:15 AM. Reason: Changed [CODE] to [CODE=php], removed email info.

  • pedjasmek
    started a topic Forcing download dialog
    in PHP

    Forcing download dialog

    I'm using this script to force browser's download dialog :
    [code=php]
    $fp=fopen('Surv ivor - Eye of tiger.mp3','r') ;
    $name=basename( "Survivor - Eye of tiger.mp3");
    $size=filesize( 'Survivor - Eye of tiger.mp3');
    header('Content-Type: audio/mpeg');
    header('Content-Length:$size');
    header("Content-Disposition: attachment;file name= $name");
    fpassthru($fp);
    fclose($fp);...
    See more | Go to post
    Last edited by Atli; Nov 9 '07, 02:26 PM. Reason: Changed [code] tags to [code=php].

  • pedjasmek
    started a topic Cookie expire
    in PHP

    Cookie expire

    Expire time in the cookie I use is next year but it expires few minutes later.Is there some setting(s) I'm missing?
    See more | Go to post

  • pedjasmek
    replied to Redirecting
    in PHP
    I've learned later that there is cure for that.It's output buffering.Use ob_start() function at the very beginning of the page(before any header was sent) and ob_clean() in the script where ever there is need for it.
    See more | Go to post

    Leave a comment:


  • pedjasmek
    started a topic Redirecting
    in PHP

    Redirecting

    How can I redirect a user to a certain page depending on some condition?(If it is true go to page 1 else go to page 2).Is it possible?
    See more | Go to post

  • pedjasmek
    replied to Storing sessions
    in PHP
    I could make some kind of voting system allowing users to vote only once in,say,24 hours or similar.This is just one example.Now you see why I've posted the question
    See more | Go to post

    Leave a comment:


  • pedjasmek
    replied to Storing sessions
    in PHP
    I came up with the same idea but I want to know something else.Assume that certain user wants to remain logged in that means that he doesn't need to fill in username and password fields again.How can I know that it's him again?
    See more | Go to post

    Leave a comment:


  • pedjasmek
    started a topic Storing sessions
    in PHP

    Storing sessions

    Can anyone tell me what is the best way to store sessions into database in order to recognize that user next time he access the site?I thought about IP address but then I remembered that it is different every time.What thing regarding a user is always the same?
    See more | Go to post

  • pedjasmek
    started a topic How to pass variables from one page to another.
    in PHP

    How to pass variables from one page to another.

    I have one link in the second script that leads to the first one.How can I pass variables from the second script to the first one?
    I cannot use $_GET $_POST variables because I don't use those requests.
    See more | Go to post
    Last edited by Atli; Nov 2 '07, 04:46 PM. Reason: Changed thread title to better describe it's contents.

  • pedjasmek
    replied to File upload
    in PHP
    Of course.The problem was with the settings in the php.ini file.Every time you alter a value in the file,you have to stop and then start again the server.I figured that out
    when I looked at the output of the phpinfo() function.It was really a small problem but it caused me many troubles.Funny thing.
    See more | Go to post

    Leave a comment:


  • pedjasmek
    replied to File upload
    in PHP
    I finaly came to the solution!Thanks everyone!
    See more | Go to post

    Leave a comment:


  • pedjasmek
    replied to File upload
    in PHP
    I've looked in httpd.conf file but there is no setting under name of "LimitRequestBo dy".I'm using Apache version 1.3.
    Instalation came with book about PHP that I bought.
    See more | Go to post

    Leave a comment:


  • pedjasmek
    replied to File upload
    in PHP
    Funny thing is that I don't get anything from the line
    Code:
    echo $_FILES['file1']['error'];
    .
    It works perfectly fine smaller files but for larger it doesn't work.
    See more | Go to post

    Leave a comment:


  • pedjasmek
    replied to File upload
    in PHP
    I'm getting "File not uploaded" and "Error" messages.
    See more | Go to post

    Leave a comment:


  • pedjasmek
    started a topic File upload
    in PHP

    File upload

    I have these two php scripts which I use to upload a file on my server(I do everything offline):

    First one is called prebacivanje fajla.php and it goes:

    [code=php]


    <html>
    <head>
    <title> Prebacivanje fajla </title>
    </head>
    <body bgcolor="yellow "><br><br>
    <center><h1> <font face="papyrus">...
    See more | Go to post
    Last edited by ak1dnar; Oct 25 '07, 11:35 AM. Reason: Added CODE=php to CODE tags
No activity results to display
Show More
Working...