Search found 56 matches

by PaTTeR
Sat Jul 26, 2003 2:24 pm
Forum: PHP - Code
Topic: Download Tracking Question
Replies: 5
Views: 955

Make PHP script for serve files not just link to the file. Something like this: <a href="download.php">Download file</a> Your php should sent specific headers and file content (ofcourse make record in DB before this). See http://php.net/manual/en/function.readfile.php - in user cntributed ...
by PaTTeR
Thu Jul 24, 2003 2:41 pm
Forum: PHP - Code
Topic: Mail problem when sending to AOL
Replies: 9
Views: 1569

Another one - check your sender e-mail - this e-mail must be valid. If you use mail() function and set 'From: sender@host.com' with headers passed to mail() in real e-mail headers you have 2 senders ('From' header) one from headers seted in mail() function and another one - http user (on UNIX like s...
by PaTTeR
Thu Jul 24, 2003 2:32 pm
Forum: PHP - Code
Topic: Global Object Space / persistent objects in php?
Replies: 2
Views: 351

You can serialize your object in XML file on HDD and keep filename in session ... but you still need session. And I think that PHP function serialize() will work faster than your oun function ;-)
by PaTTeR
Tue Jul 22, 2003 1:59 pm
Forum: PHP - Code
Topic: Really weird!
Replies: 9
Views: 2592

INT type in MySQL can't hold values bigger than 2147483647 , if you declare it as UNSIGNED max value is 4294967295. So if you need to keep big values change column type.
by PaTTeR
Tue Jul 22, 2003 1:50 pm
Forum: PHP - Code
Topic: Loop question.
Replies: 6
Views: 970

$records_count = mysql_num_rows($get_all) $i = 0; while ($row = mysql_fetch_array($get_all)) { $i++; if ($row[3]) { echo $row[3]; echo ($record_count == $i) ? '' : ', '; } } hmmm this should work corectly only if you have an e-mail seted in last row. there is other idea :lol: <?php while ($row = my...
by PaTTeR
Mon Jul 21, 2003 2:51 pm
Forum: PHP - Code
Topic: Single page website - question about article
Replies: 5
Views: 674

This path must be full path to your folder. If you are on Windows box you should use Windows style path - C:\your\files , if you are oh Unix (Linux) box - /your/files

For better explain see this:
http://php.net/manual/en/configuration. ... clude-path
by PaTTeR
Mon Jul 21, 2003 2:31 pm
Forum: PHP - Code
Topic: Is there any method to create text file on Client machine ?
Replies: 5
Views: 1056

This is possible, but not with PHP. You can use Java aplication for this, but your users must give it access.
by PaTTeR
Tue Jan 14, 2003 7:31 am
Forum: PHP - Code
Topic: session_start() kills my form ?
Replies: 2
Views: 604

Use

Code: Select all

ini_set ('session.cache_limiter','private, must revalidate');
in the begining of you script, or change default cache behavior in php.ini
by PaTTeR
Wed Jan 08, 2003 2:53 am
Forum: PHP - Code
Topic: PHP reference/manual in XML
Replies: 2
Views: 534

10x volka. I found that i need ;-) . Now I have source of php.net manual from cvs - phpdoc.
Long life 'Open Source'
by PaTTeR
Mon Jan 06, 2003 5:20 am
Forum: PHP - Code
Topic: PHP reference/manual in XML
Replies: 2
Views: 534

PHP reference/manual in XML

I need a php reference or manual in XML format. May be someone know from where i can get it ?
by PaTTeR
Mon Jan 06, 2003 5:05 am
Forum: PHP - Code
Topic: repeat repeat repeat
Replies: 3
Views: 1082

Try this ...... while($news_inc=mysql_fetch_array($news_inc_result,MYSQL_ASSOC)) &#123; ..... By using MYSQL_BOTH, you'll get an array with both associative and number indices. Using MYSQL_ASSOC, you only get associative indices (as mysql_fetch_assoc() works), using MYSQL_NUM, you only get numbe...
by PaTTeR
Thu Dec 26, 2002 3:51 am
Forum: PHP - Code
Topic: Get user real IP
Replies: 3
Views: 557

Yes it is, but i have not any other idea ;-(
by PaTTeR
Sun Dec 22, 2002 1:32 pm
Forum: PHP - Code
Topic: Optional parameters for custom functions.
Replies: 3
Views: 620

Code: Select all

function test($required,$not_required='') &#123;
  ........
&#125;
Now you can use both

Code: Select all

test('hallo');


test ('hallo','world');
But keep in mind, if you use moore optional paramters.
by PaTTeR
Sun Dec 22, 2002 1:08 pm
Forum: PHP - Code
Topic: Get user real IP
Replies: 3
Views: 557

Huh, i find it

Code: Select all

$_SERVER&#1111;'HTTP_X_FORWARDED_FOR']
$_SERVER&#1111;'HTTP_VIA']
but these variables isn't in php doc ;-(
by PaTTeR
Sun Dec 22, 2002 12:10 pm
Forum: PHP - Code
Topic: Get user real IP
Replies: 3
Views: 557

Get user real IP

So, if user uses proxy server $_SERVER['REMOTE_ADDR'] is proxy's IP. How can get real user IP?