[PHP] Re: I cannot forget you!

2006-07-11 Thread Barry

[EMAIL PROTECTED] schrieb:

your big love, ;-)


Well PHP is good  but is it that good?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: UTF-8 With content-type text/xml problem.

2006-07-21 Thread Barry

Mathijs schrieb:

Hello ppl,

I have a big prob.

I have a page which post some input.
This input can be UTF-8 like chinese or other utf-8 chars.
Also i need it to return UTF-8 and it has to be xml.

For some strange reason this isn't working.

Small example.

PHP Code:
'."\n";
print ''.$_GET['test'].''."\n";
?>

as GET var fill in something like ?test=éëêæ

This will break it..
Only Opera does a good job. Firefox and IE both can't handle it.
If i remove the header Firefox goes well.
IE Still can't handle it.

I Just need simple XML with UTF8 data.

PS:
This also breaks database saving, it doesn't save correct.
And i have mbstring installed.


Thx in advance.


Is the output also UTF-8 encoded?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Is this really a pdf?

2006-08-07 Thread Barry

Sjef schrieb:
Is it possible to recognize if a file for upload really is a pdf (like the 
function getimagesize retuns the file type of the image)?

Thanxs,
Sjef 

this "might" help

http://de3.php.net/manual/en/function.mime-content-type.php

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Regular expression to find from start of string to first space

2006-08-08 Thread Barry

Dave M G schrieb:

PHP,

Shouldn't this regular expression select everything from the start of 
the string to the first space character:


$firstWord = preg_match('#^*(.*) #iU', $word);

It doesn't, so clearly I'm wrong, but here's why I thought it would:

The enclosing has marks, "#", I *think* just encloses the expression. I 
was told to use them before, but I can't find them here:

http://jp2.php.net/manual/en/reference.pcre.pattern.syntax.php

The caret, "^", says to start at the beginning of the line.

The first asterix, "*" after the caret says to use any starting character.

The space just before the second "#" is the closing character of my search.

The "(.*)" in the middle says to take anything in between the beginning 
of the line and the space.


"iU" says, "be case insensitive, and don't be greedy".

So, it should start at the beginning of the line and get everything up 
to the first space. But it doesn't work.


Where did I go wrong?

--
Dave M G

http://www.rexv.org/

This is a quite good site to learn and test regexpressions.

Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: __get() accessor question (a bug maybe?)

2006-11-15 Thread Barry

TemuriI schrieb:

Hi all, here is the code I am having problem with:



class baseForm {
   private $_id = 10;

   function __get($member)
   {
   echo "Accessing member \"{$member}\" : \n";
   return $this->$member;
   }
   function checkID()
   {
   echo $this->_id."\n";
   }
}
class inputText extends baseForm
{
   function display()
   {
   $this->checkID();
   echo $this->_id."\n";
   }
}
$f = new inputText();
echo $f -> display();





Probably bcause its private and therefore only for that class?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: __get() accessor question (a bug maybe?)

2006-11-15 Thread Barry

TemuriI schrieb:
just a small idea.

public function __get() {...}

Might work *untested*

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Beta Testers Wanted

2006-02-23 Thread Barry

Matt Palermo wrote:
Hey guys.  I would like to first say thanks for all the help you have all 
given me in the past (especially in my early programming days).  Once again, 
I would like to show my appreciation by offering an opportunity to use a new 
PHP program I have created.  The program is called TotalXplorer.  Basically 
it's an online file manager for your website that uses PHP's FTP 
functionality to perform actions on files/folders (this get's rid of the 
need to make them writable for PHP).  The file manager also has a built-in 
file upload feature, file editor, mp3 music player (to play tracks directly 
from your site without downloading them first), and more.  You can view the 
demo of it here:


http://sweetphp.com/projects/TotalXplorer/

I'm looking for 5-10 people who would be willing to help test it out and 
give feedback about it.  In exchange for this, you will receive a free copy 
of the software when it's ready to go.  If you are interested, please let me 
know.  This will be first come, first server, but please be willing to put 
in a little time with the testing of it.  I have offered similar beta 
testing programs for some of the other scripts I have available at 
http://sweetphp.com and they have become very successful because of all your 
help.


Thanks,

Matt Palermo
[EMAIL PROTECTED]
http://sweetphp.com 


lol, how about you give your images some ALT tags?
And i don't think the text shouldn't break right after the folder icon.
(looks kinda crappy for me though ;)

greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: File database, works, but direct url access in addressbardoesn't

2006-02-23 Thread Barry

Mathieu Dumoulin wrote:

Update update update


I tried with mozilla firefox and it worked fine, i just need to find out 
now what IE does that makes this process fail. If any of you have an 
idea that could help me solve my problem don't hesitate cause i need to 
find a solution.

Probably not the appropriate headers are set to send the file?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Expiring other resources with HTTP headers

2006-02-27 Thread Barry

William Lovaton wrote:

Hello everybody,

I write here to find out if this is possible:

I want to expire an static file in the web browser through an HTTP
header (Expires, Cache-Control or something else) sent from a PHP
program.  The usual thing is that those headers apply only to the
program or file sending those headers, what I want is that a program
sends those headers to affect a different file in the browser cache.

In more detail, My web app generates a JavaScript file from the
information stored in the database, that file represents the user menu
and it is what the user sees in the web browser.  Now, through an apache
directive I set expiration times for several kinds of static resources
so the web server doesn't get slash dotted with lots of unnecessary
requests (this is a web app with lots of traffic).

Although the JavaScript files are generated from PHP, it is seen as
static content from the web browser POV.  Right now I have set the
expiration time for the menu files to 20 minutes.  But let's say an
admin user change the permissions of a user and the affected user hits a
link that says "Regenerate menu".  What will happen is that the
JavaScript file will be regenerated on the web server but there is a
chance that the browser won't see the change because the file is still
valid in the cache.

I know I could reduce the expiration time to reduce this problem but
most of the time those files do not change.  What can I do to notify the
web browser that the file in the cache is no longer valid?

I hope there is enough information here and that somebody can give me a
hint in the right direction.

Thanks,

-William

Set the HTML expire to yesterday.
Therfore the browser will reload the whole page.

Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Sr. PHP Salary North Carolina

2006-02-27 Thread Barry

Beau Gould wrote:
Can anyone possibly tell me what the salary range is for a Sr. PHP/MySQL Developer in North Carolina? 


Thanks


Depends on the workspace and what kind of work somone has to do.
Is it a monitoring position, or a leading one.

More infos would probably help though.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: About date & time...

2006-02-28 Thread Barry

Gustav Wiberg wrote:

Hi

Thanx for your input about date & time...

Here's some functions that worked for me after some searching...


function currenttime() {

$today = getdate();

$ithours = $today["hours"];
if (intval($ithours)<10) {
 $ithours = "0" . $ithours;
}

$itminutes = $today["minutes"];
if (intval($ithours)<10) {
 $ithours = "0" . $ithours;
}

$itseconds = $today["seconds"];
if (intval($itseconds)<10) {
 $itseconds = "0" . $itseconds;
}


$it = $ithours . ":" . $itminutes . ":" . $itseconds;
return $it;
}

function currentdate() {

$today = getdate();

$idyear = $today["year"];
if (intval($idyear)<10) {
 $idyear = "0" . $idyear;
}

$idmonthnr = $today["mon"];
if (intval($idmonthnr )<10) {
 $idmonthnr  = "0" . $idmonthnr ;
}

$idmonthday = $today["mday"];
if (intval($idmonthday)<10) {
 $idmonthday = "0" . $idmonthday;
}


$id = $idyear . "-" . $idmonthnr . "-" . $idmonthday;
return $id;

}

$insertTime = currenttime();
$insertDate = currentdate();



/G

OMG >_<

There are lotsa functions like date and so

Also > $idmonthday = "0" . $idmonthday; < This is totally crap >_<

Therefor is the sprintf function ...

I know it works, but well. if noone wants to check the manual for better 
functions.. Your choice


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fw: 参加してみませんか?

2006-02-28 Thread Barry
Andrei wrote:
> u... Nice... I would agree if I would understand something... lol
> 
> Andy
> 
> sns-コミュニティー wrote:
> 
>>■□■ コミュニティー・エンターテイメント ■□■
>>□■□ ソーシャルネットワーキングサイトに参加してみませんか? □■□
>>
>>メンバーより招待された方のみで構成されている為、安心快適!!
>>ポイント代・料金等は一切御座いません。全て無料でお使いになれます!
>>
>>http://tada-asobi.com/tada/keijiban3/
>>テレビ・雑誌で話題!有名芸能人のブログ、写真等を全て無料でご覧になれます!
>>
>>■これまでの友人関係を活性化できる
>>信頼できる旧知の友人、お知り合いとのお付き合いの活性化を図るさまざまな
>>ツールをご用意しています。
>>
>>■「友人の友人」と交流できる・芸能人、アイドル、俳優と友達になれる!
>>
>>友人同士のネットワークをたどって「友人の友人」との交流が
>>簡単にできます。そこにはあなたの友人から繋がる信頼できるネットワークが
>>形成されています。どこかで繋がっている人同士が集まるコミュニティー
>>であり、これがソーシャルネットワーキングの特徴です。
>>
>>テレビ・雑誌で話題!ご利用料金・登録料は一切御座いません!全て無料でお使いになれます。
>>
>>情報・コミュニティーに最適!
>>http://tada-asobi.com/tada/keijiban3/
>>それでは、参加を心よりお待ちしております。
>>※2006/03/06まで有効

Lol its just plain spam mail xD

You can get some shitn crap if you go to the site and apply to some
stupid stuff.

And guess what you get, a whole bunch of nonsense!


quick quick ;)
-- 
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] ftp_get from an IBM Mainframe z/vm system ?

2006-03-01 Thread Barry

Robin Vickery wrote:

On 01/03/06, Nils Reimann <[EMAIL PROTECTED]> wrote:


$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass");
$download = ftp_get($conn_id, "$locale", "TEST EXEC", FTP_ASCII);
ftp_quit($conn_id);

connection workd, but the download did not. i got this error.

Warning: ftp_get(): Error opening in phpfile on line 174



The format of this error message is "Error opening  in

[PHP] Re: Where can I find nice Web icons for custom admin interface?

2006-03-02 Thread Barry

Nicolas Verhaeghe wrote:

I have a habit of designing pretty much everything myself as far as CMS
and admin areas, but I was wondering if anybody knew where to find Web
icons to make the result look very professional?

I am really not a graphical/layout guy!


www.icons-to-make-my-stuff-shiny-and-professional.com

You probably should get somone that is one, or learn it.

If the website above works, then there is one otherwise >>no<<.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Where can I find nice Web icons for custom admin interface?

2006-03-02 Thread Barry

Thorsten Suckow-Homberg wrote:



www.icons-to-make-my-stuff-shiny-and-professional.com

You probably should get somone that is one, or learn it.

If the website above works, then there is one otherwise >>no<<.


What a valuable response... oO

Nicolas, you should google for Linux-Themes (KDE etc.), most of the icon 
collections come with an appropriate license (Crystal theme came AFAICR 
with the GPL bundled)...


HTH


Thorsten

Sorry i just get mad that ppl are toOOooOoOo lazy to use google.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How can I tell if an output stream is finished?

2006-03-06 Thread Barry

Al wrote:

I have a page that resizes an image to be included in a html page, using:

echo "\n";

unlink($rel_mapfile);

I need the other html stuff on the page so I need to fetch a file from 
the server to include in the page.


So, I resized the image and saved it as a file.  That works fine.

After sending the temporary resized file I want to delete it.

Obviously, an unlink($rel_mapfile) is executed before the echo "src=\"$rel_mapfile\" ... is finished.


Thanks

Use flush();

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] output Today's date

2006-03-06 Thread Barry

[EMAIL PROTECTED] wrote:

On Sat, Mar 04, 2006 at 07:01:55PM -0700, Paul Goepfert wrote:


Hi all,

ls there anyway I can set the date to the timezone of the clients
timezone?  For example, if a person opens the web page at 3/6 12:01
EST and another person opens the same page at 3/5 10:01 MST I would
like the date to be the above days on the client computers.  I know
everyone knows this but the way I described this the two people
accessed the webpage at the same time but I want the


correct date for


the client computer to be outputted.


There are some tools that you can detect where the person is
located and and you would be able to use the timezone from
that information. One site I found from a quick google search:

http://www.ip2location.com/


The cheapest and simpliest method would be to use some
javascript to detect the timezone. Or let the user specify
which one he wants to use.


Hi,

Javascripts' Date object has a getTimezoneOffset() method, which returns
the difference between local time and universal time in
minutes.

Jared

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Hi there!

Yes, Javascript may have a such function, BUT think of the reliability...
It's not sure, that user has the Javascript-functionality turned on, what
happens then?

Best regards
Gustav Wiberg

The IP to location is the best way.
I am not quite sure but is in the HTTP GET header or the headers 
following then not the timezone included?


I am talking about the Headers the Browser sends.

Greets Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mysql Rows

2006-03-06 Thread Barry

tedd wrote:

As such, if you don't renumber, then the only thing left is to use a
timestamp, I guess.
[/snip]

No, if you have gaps you can still step through sequentially, like 14,
15, 18, 19, 20...



It's the gaps that are the problem.

I have no problem understanding why there are gaps in a dB and dealing 
with them. After all I've been juggling memory and bit-twiddling longer 
than I want to admit, so I understand "holes" in stuff. But what I am 
trying to solve is the simple thing of presenting records to a civilian 
such that there are no gaps in his record keeping.


I don't want to have to explain to my client why his dB has gaps in it. 
I don't want to listen to him asking why those gaps aren't filled. In 
fact, I don't want to raise the issue at all if I can get around it.


One way I found to get around this problem was to simply renumber the 
"id" filed in the table -- but, I received considerable advice against 
that from this list. I'm still not certain as to why that shouldn't be 
considered a "good" solution, but the "feelings" of the group are "don't 
do it".


So, I'm still trying to find a simple way around this problem. Either I 
renumber the "id" field OR provide an external counter to present to the 
user. I don't see any other solutions, does anyone?


Thanks.

tedd


Well it seems you output it via PHP so count it extern in PHP.
And changing ID values is a "no-go!"
You will never have any relation possibilities if you alter the ID fields.

In short. You mess everthing up with it.

There are count functions in MySQL that gives you the counted rows or 
output it counted.


You can look at the manuals in mysql.com

Good luck
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Detect where someone comes from

2006-03-06 Thread Barry

Benjamin Adams wrote:
I was wondering if there was a way I can see where people are linking  
to me from.  Can I find this in php?

--Ben

$_SERVER["HTTP_REFERER"];

It's an Apache server variable.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: encrypt and decrypt in php

2006-03-07 Thread Barry

suresh kumar wrote:

I searched google,weberdev and php.net sites. i implemented the 2 encrypt and 
decrypt functions  mcrypt_encrypt(),mcrypt_decrypt() and mcrypt_ecb() 
functions.but it not working properly.i dont need more complicated encrypt and 
decrypt functionality.just i want to encrypt my user id when i pass from page1 
to page2 and i want to decrypt  it in page2.i am looking forward reply from u
   
 A.suresh



-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

Generate an MD5 hash.
This surely will noone decrypt :)

And when you pass vars from site1 to site2 you can also use session 
variables or POST vars.


In a session, noone will have access to it, well except you of course.

Greets
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what is wrong with my big array

2006-03-07 Thread Barry

Stut wrote:

Ross wrote:


I cannot see it


If it helps... neither can we!

-Stut

And again:
PHP is best coded with open eyes: (O_O)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: test security of code

2006-03-08 Thread Barry

Gregory Machin wrote:

Hi
Is there an application that can pass source code and report potential
security problem and or the live site ?
Many thanks
--
Gregory Machin
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.linuxpro.co.za
www.exponent.co.za
Web Hosting Solutions
Scalable Linux Solutions
www.iberry.info (support and admin)

+27 72 524 8096

Nothing that would find every security hole.
Because every developed site is different, has different variables, uses 
probably flash/cgi/javascript and a MySQL/PostgreSQL/MSAccess Database 
and so on.


There will be never such a program that can do your specific security 
test, or it would just cost thousands of dollars and would have to keep 
better up to date than the developer of your applications.


Best thing is always to test it yourself!

Write down what function you have and what it does, then think about how 
somone could breach in.


I know there are some people offering such a service.

Probably it's that what you search for ;)

Greets
    Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Charsets ?

2006-03-08 Thread Barry

Ruben Rubio Rey wrote:

Hi, I hace a functions that does a think, it cleans strange characters:

$trash_string='whateverwithstrangecharacterslikeñ';
$clean_string=strtr(trim($trash_string)," 'ç/-àáãèéìíòóõùúüñ()äëïö,", 
"__c__aaaeeiiooouuun__aeio_");


Its strange, but if I work with php's charset iso8859-15 it works fine, 
but i I set php to utf-8 it does not work.

Any ideas?

Sure.
UTF-8 is an other encoding.
Those characters are shown as UTF-8 encoded Characters.
use the decode and encode function.

Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: .DAT file with PHP

2006-03-08 Thread Barry

Jabez wrote:

I want to use PHP to show the contents of the DAT from back to front. HOw do

I do that?

Thanks!

 




Put it into an array and sort it backwards with krsort()

Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: .DAT file with PHP

2006-03-08 Thread Barry

M. Sokolewicz wrote:

Barry wrote:


Jabez wrote:

I want to use PHP to show the contents of the DAT from back to front. 
HOw do


I do that?

Thanks!

 




Put it into an array and sort it backwards with krsort()

Greets
Barry

why use such an cpu-intensive function? using array_reverse is a lot 
faster...


- tul

is it?
I didn know that.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] .DAT file with PHP

2006-03-08 Thread Barry

Jabez Gan wrote:

Sorry im new but, how do we read from a file to an array? I've studied C but
not with PHP and it's not working for me... Suggestions?


By line ?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP + MMS Live Streaming + Protect URL.

2006-03-09 Thread Barry

Gentil de Bortoli Júnior wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



-Original Message-
From: Gentil de Bortoli Júnior [mailto:[EMAIL PROTECTED]
Sent: 9 March 2006 2:01 pm
To: php-general@lists.php.net
Subject: [PHP] PHP + MMS Live Streaming + Protect URL.


Hello, guys.

I have a little problem here and I would like to know if you
have any idea about how to handle it.

I have an URL which is streaming a live TV channel and I need to
implement, using PHP, some kind of validation to allow that only
one person (login) watch it. I mean, multiple logins are not allowed.

So far, so good.

My problem is that the URL can be copied and pasted. I'm trying to
figure it out how to hide and/or protect this URL to permit only
logged in people can see the streaming.

Do you have any idea?

Thanks in advance and excuse me about my English.



George Pitcher wrote:


Hi,

I would use a cookie. That cookie is set on an earlier page (during
login  validation?). On the page that streams the broadcast, check
for the contents of the cookie and if not valid, redirect browser to
log-in page.

I do this for some copyright material on my sites.



Thanks, George. But I think I should give you more information about
my situation.

This URL is being provided by a Windows server.

Let's suppose that it is something like "mms://my.windows.server/live".

So, my job is to avoid this URL can be copied and pasted by someone
which is not authorized (logged in).

The main problem is that I don't have any kind of control over
Windows server or over that URL.

Even using cookies or some kind of session control, someone will still
be able to see this URL and simply paste it in another browser and
starts to watch the streaming.

Actually I don't know if what I'm trying to do is possible.

That's why I'm asking you.


Use htaccess?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: umlaut problem in firefox

2006-03-15 Thread Barry

Andy wrote:

My problem still remains open Help!!!

I noticed that if the umlauts are received correctly but they are not 
submitted in the right way.

For a ö I receive a POST as: ö

 From the DB I get the text correctly.


The DB encoding is : iso-8859-1.

Now, the strange thing is that is does not appear ALWAYS and only sometimes
and only in firefox.
So.. I cannot really reproduce the error every time which is hard to
debug.


-snip-
POST as: ö
-snap-

This is Unicode UTF-8 encoding.

If this error occours again check the following:
added tag in HTML:


If this is set check if the browser is set correctly:
View -> charencoding/websitencoding
Check if it is set to Western ISO 8859-1

check how it is given out in the sourcecode.

check if there are entries which have an other kollation than the other 
entries.


This is what i can think of.
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: to check idle time of users

2006-03-15 Thread Barry

suresh kumar wrote:

in windows,if user idle for 1 minute,his desktop
screen is changed to screen saver.i like to implement
the same logic in my project if user is idle for 3
minutes its session will have to automatically 
destroy.i am waiting for or response.




__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com


~ set php.ini session timeout ~

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: REG-EXPR: Allowing limited number of special chars in usernames

2006-03-15 Thread Barry

Holger Sunke wrote:

Hello,

I dont know that much aboput regular expressions and just want to know how to 
find out the number of special (non alphanumeric) characters in a string or how to match a string that contains less than 3 special chars.


urrently im using a function

function valid_username($string) {
   if(strlen($string)<=16&&strlen($string)>5) {
  return(preg_match('/^[ -~äöüßÄÖÜ]+$/',$string));
   } else {
  return FALSE;
   }
}

This allows usernames of 6 to 16 length containing many special chars and German 
"Umlaute".
But this also allows usernames like "=)/(&%$" what should not be.

So how to limit the number of special chars? This function should just return fals 
if number of special chars > X

Greets,

Holger Sunke
One thing that comes to my mind would be splitting up the string into 
letters, numbers and signs with ereg()/preg() and count each one.


Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: how do i select this list

2006-03-16 Thread Barry

Mark wrote:

THANKS THAT WORKED GREAT



You might need this in the future:
http://dev.mysql.com/doc/refman/5.0/en/index.html

Thare are lot's of examples, also the problem you stated is described there.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Updating form

2006-03-16 Thread Barry

Sugrue, Sean wrote:

Does anyone know how to update an option list queried from a database
table after an insert/delete action on that table?

Sean


To be as precise with my answer as your question:

Read the HTML manual about meta tags.

have fun!

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: REG-EXPR: Allowing limited number of special chars in usernames

2006-03-16 Thread Barry

Holger Sunke wrote:

Yes thank you,

that's all I need!




  * beware that you're saying *anything* other than alpha-numeric chars


Yeah that's why it wont work with asian or kyrillian users.
Probably writing a function that counts each special char could be an 
answer  ... prolly

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How does one obtain the resolution of an image in PHP?

2006-03-17 Thread Barry

Arnaldo Gandol wrote:

hi, I have troubles with strangers characters in my html pages, I've fixed
them by using mb_convert_encoding() function with  UTF-8  encoding  but I've
hear that mbstring library is unstable in some linux distributions. Does any
body knows how to solve this problem without using mbstring library. I'm
working with php-5.

Thank you beforehand.

Yeah if you tell me what that has to do with the resolution of images!

Please create a new post on the main list!
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How does one obtain the resolution of an image in PHP?

2006-03-17 Thread Barry

Simon M. Campden-Main wrote:

Good morning, folks.

Can any one direct me to a snippet or suggest an approach to obtaining the
resolution of an image [file] with PHP.  exif_read_data() is great if the 
image
was taken with a camera that is exif compliant, but is no help with my 
scanned

images.  getimagesize() gives me height and width - not much help that I can
see. I want ppi!  I've no doubt that this is another case where the answer 
is

painfully obvious and my mind to dull, but I've spent the better part of the
day searching usenet groups and the PHP docs and come up with naught.
I'm running the current Cent OS distribution of EL, PHP Version 4.3.9 with, 
of

course, GD support. Any suggestions would be most appreciated.
Thank you.
Simon
[EMAIL PROTECTED]

 

There is no way you can do it.
To have on screen e.g. 40 ppi or 80 ppi when the image has a size of 
400x400 pixel you would have to read out the image how big a pixel in it is.
at 80 ppi you would have your normal image and on 40 ppi the pixels used 
per dot would be duplicated. you still have 400 pixel in width and you 
would not be able to "count" the pixels who got duplicated.


If you are lucky it's written in the file. Otherwise no chance.

The normal screen resolution is: with an average of 0.26 mm ~ 3.8 
pixel/mm ~ 97 pixel per inch.

No matter what kind of "resolution" you would choose
(800x600,1024x768 etc.)

an image having for example 48ppi would have pixels that use 2x2 pixels 
(4 pixels) as one colored pixel and so on.


Now guess what you see when you have 194 ppi.
Nothing, it's still 97 ppi because it's not possible for the screen to 
view anything else. Normally the screen would just duplicate the 
imagesize from 400x400 to 800x800.


Greets Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: session_cache_expire()

2006-03-17 Thread Barry

suresh kumar wrote:

I searched php.net/session and weberdev website and
implemented session_cache_limiter() and
session_cache_expire() function.but i am not getting
the output what i want.i spend whole day on
searching.any one give the solution for my problem


in windows,if user idle for 1 minute,his desktop
screen is changed to screen saver.i like to implement
the same logic in my project if user is idle for 3
minutes its session will have to automatically 
destroy.i am waiting for or response.




__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

You have to set the session timeout to 3 minutes.
Or set a javascript that automatically routes to a site that kills the 
session when the user is idle for 3 minutes.

you could set a  html tag for that also.

Note: session_cache_expire() and session_cache_limiter() has to be set 
before session_start()


Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: double lines

2006-03-17 Thread Barry

clive wrote:

Hi

Im using the phpmailer class to send text emails (not html), it works 100%.

So emails sent from a php script look correct in the mail client, 
however when I first load/show the message in a  and then send 
it to the same script which then sends the email, on some mail clients 
there are double line between paragraphs.


Its almost like the  is putting in a extra \n, how can I test 
for this or fix this problem.


Regards,

Clive

This might be because there are \r in it.
Search for them and replace them with "" so you wont have any probs.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] making a tutorial

2006-03-17 Thread Barry

George Pitcher wrote:

Which of the following pets do have at home:
dog
cat
snake
snake
none of
these



[snip]


I don't know if this works in PHP as well.


It is a "checkbox" so it won't work without "[]" in PHP.



It will work without []. It will just not be an array.

For checkboxes you could use it without [] but then it would be more like
a radio button. Or you could use it with different names in name="".





Surely parsing the final checkbox would overwrite any previous ones unless
they were clearly identifiable as different.

George

numerize them favourite[1],favourite[2],favourite[3]... and so on

That works!

btw print_r($GLOBALS) would you print out what you got from the Posted 
site with some more values.


Give it a try

Greets
barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: double lines

2006-03-17 Thread Barry

clive wrote:


Does the html  add in \r.


Normally not.

But the mailing function might do.
Replace every \n with  and every \r with  with 
str_replace

And probably you see where the problem is

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: How does one obtain the resolution of an image inPHP?

2006-03-17 Thread Barry

- Edwin - wrote:


Reading the surrounding sentences, I think I can see where
you're coming from. But, the above statement is a bit
confusing.

There is a reason why it's called "pixel per INCH". And it
definitely have something to do whether your monitor
is set to 800x600, 1024x768, etc.

It's confusing but it's not ;)
It's quite hard to explain but having the monitor set to 800x600 the 
physical inch isn't anymore.
the image is still in 80ppi but using now the "bigger" pixels as 
reference per inch.


This is very confusing and this whole ppi is very disturbing, because 
there isn't any real standard applyable for screens.


A 15-inch monitor at 800x600 will have around 53ppi x 40ppi
(800 pixels divided by 15 inches, etc.) and *the same* monitor
at 1024x768 will have around 68ppi x 51ppi.

That's correct the ppi (theoretically) will be 53 or 68.


If your 15' monitor is normally setup at 1024x768, everything
(images, etc.) will look a bigger if the same image is viewed
using the same monitor at 800x600. This happens because
the pixels are now "bigger". (One image "pixel" is now compose
of many physical dots on the screen.) But, I guess, you already
knew that. (^_^)

Right ;)
But the image is still in 80 ppi ;)

And you probably now get where the problems are ;)

Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP files in the SRC attribute of an SCRIPT element

2006-03-17 Thread Barry

Karl-Heinz Christian Zeck wrote:

Hi everybody,



Are you allowed to do this? I mean, is the php file parsed by the PHP engine
first and a js code is generated that will be used
by the script element?


Yes


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP files in the SRC attribute of an SCRIPT element

2006-03-17 Thread Barry

Karl-Heinz Christian Zeck wrote:

Thank you for your quick reply.

I tried to modify the file. I removed all it's content and wrote only a
single line:
alert("test");

When I refresh the main page, I get the alert message - this means the file
was loaded successfuly.

Then I tried this code: alert("");

This way it doesn't work, no alert message, so the file wasn't loaded.

Any ideas?

Thats because you don't load the Javascript file over HTTP and load it 
locally.

The webserver doesn't parse it that way.
That way he just reads it and thats why it isnt parsed

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Fatal error: Call to undefined function preg_match()

2006-03-20 Thread Barry

Evert wrote:

Hi all!

Recently I am getting the following error on some of my PHP-enabled websites. I 
think it started when I went from PHP4 -> PHP5.

Here is an example (from http://wos.poboxes.info/) :


Fatal error: Call to undefined function preg_match() in 
/var/www/wos.poboxes.info/htdocs/classes/ConfigData.php on line 114


What causes this? How can I fix it?
FYI: I use Cherokee (not Apache...)



Regards,
Evert

On some pages?
So it works on the other pages on the same webserver?

Probably you have unset the function, or some file/php/include/script does.
Best way to test that is to put preg_match at the first line.

Is a htaccess causing trouble probably?
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Fatal error: Call to undefined function preg_match()

2006-03-20 Thread Barry

M. Sokolewicz wrote:
Since when can you "unset" functions from within php scripts?? (except 
with specialized modules, which we'll just ignore for now).

Why ignore them for now?
Doesn't make sense for me ...

>>Recently I am getting the following error on some of my PHP-enabled
>>websites. I think it started when I went from PHP4 -> PHP5.

He went from 4 to 5, do you know what 4 had compiled in? no you don't.
Why don't just ignore he went from 4 to 5.
So we can see this post as "i installed php 5 and got error X"

Sorry, i think that's big nonsense.

Greets
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: want authentic branded goods?

2006-03-20 Thread Barry
2006-03-20 23:19:13 wrote:
> This is a kind business letter,if bothered you,pls send your email to us,we 
> will sure cancled your email address from our email list.
> 
Nah ;)
This is kind of Spam Mail!

>   
> Gurantee your 100% absolutely safe ''Door to Door'' delivery!!
Front door or back door?
I like to have my deliveries delivered indoor.
Outdoor is cold!

> We supplying authentic branded stocklots incl shoes, handbags, clothes, 
> wallets, glasses, belts.We can produce for you under your authorized paper,or 
> source them from official authorized factory stocklots  markets. We supply 
> authentic cards and paperwork.
Should i be some kind of amazed now?


> Supply "Door to Door" delivery, and 100% Guarantee Customs Clear by EMS 
> Now!!!
> We will simply send,send,send.. and resend until you get them!!!
> All for free
Omg you send,send,send and don't stop? aww ;_;
Even if i don't want them? >_>

> Prices CIF in USD incl goods cost, shipping cost, and insurance already!!!
> We dropship goods to your cutomers directly from us!!! So what you need 
> to do is only find them and tell them what you can give them!!
> Accept Western Union/Moneygram/bank account, but don't accept paypal for now.
Haha yeah find me xD *hides*
Wut no paypal? SHAME ON YOU! xD

> 1.Place orders on our website;
Sorry my Packet doesn't fit in my monitor >_>
> 2.Use msn:[EMAIL PROTECTED]; or 
To send my package?
Uhm , i wonder if it fits into an email -_-
> 3.Wirte to [EMAIL PROTECTED] 
Isn't that the same as #2? :)
> Any way, let us know your payment info and your address with a phone call 
> number
"Anyway" man your english sucks a lot ;)

-- 
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Retrieve large amounts of binary data from MySQL database in pieces

2006-03-21 Thread Barry

Michael Thomsen wrote:

Hi, I was wondering if anyone knew how to retrieve large amounts of
binary data from a MySQL database without having it loaded all at once
into a PHP data structure. I'd like to be able to iterate over the
result, pulling out 16kb or so of data at a time and feed it to the
browser. Any suggestions?

Thanks,

Mike

With the SUBSTRING function of MySQL.

This question belongs more to a MySQL mailing List.

And read the manuals!

Took me 5 secs to find that function.

Be glad that somone is in a good mood to help such a lazy guy like you.

Greets
    Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: dunk $25 shipped

2006-03-21 Thread Barry
2006-03-21 13:10:27 wrote:
> This is a kind business letter,if bothered you,pls send your email to us,we 
> will sure cancled your email address from our email list.
How stupid are you?
You are Posting to a MAILING LIST, idiot ...


> 
> www.loveinfashion.com
> email and msn: [EMAIL PROTECTED]
> QQ:158336954
> 
> www.loveinfashion.com
> MSN:[EMAIL PROTECTED]
> qq:158336954
> Nike Dunk Shoes in Stock
> size;41-46
> 350 pairs
You don't give up, don't ya?


-- 
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: is there a guide for pda friendly web pages

2006-03-21 Thread Barry

Rick Lim wrote:

is there a guide for pda friendly web pages.

Yeah there is one.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PDFLib or some free solution?

2006-03-21 Thread Barry

[EMAIL PROTECTED] wrote:

Hi,
I have to create some flyers and invoices (simple stuff) in one my
project. On php.net/pdf is mentioned PDFLib, but I know there is a free
solution too. It's commercial and can't have PDFLib for free.
My questions are:
- Is really $450 for PDFLib worth comparing to free solution? (I need for
really simple stuff)
- Is there a difference (look and programming) and how "big" it is,
between PDFLib and free solution?

Could you please give me some directions?

Thanks.

-afan

www.fpdf.org
For simple and simple-complex ones very good.
No EPS and PS support though.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: is there a guide for pda friendly web pages

2006-03-21 Thread Barry

Matt Richards wrote:

Rick Lim wrote:


is there a guide for pda friendly web pages.


Yeah there is one.


lol, would you like to tell us where its located please?


oN tHe InterNeTz!

Really... be more specific and probably we also be.

Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: dunk $25 shipped

2006-03-21 Thread Barry

John Nichel wrote:

Barry wrote:


2006-03-21 13:10:27 wrote:

This is a kind business letter,if bothered you,pls send your email to 
us,we will sure cancled your email address from our email list.


How stupid are you?
You are Posting to a MAILING LIST, idiot ...



I'm betting the bot isn't reading your reply.


To bad ;)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: undefined function error with lost password script

2006-03-23 Thread Barry

Mark wrote:
Can anyone see a problem with this at a glance. I think i have pushed my 
luck with this forum ( inc. Chris)of late but i paid a lot of money for this 
script and it has a few bugs.


THis is what i get returned---
Fatal error: Call to undefined function: recover_pw() in 
/home/realt905/public_html/lost_pw.php on line 70


where line 70 is : recover_pw($_POST['email_address']);


1. If you paid for it, why don't you ask the support?
2. Please use sites like pastebin.com to post huge code snippets.
3. The function lost_pw is called before it's declared!

Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] undefined function error with lost password script

2006-03-24 Thread Barry

Robin Vickery wrote:

On 24/03/06, Richard Lynch <[EMAIL PROTECTED]> wrote:


In incredibly ancient versions of PHP, you needed to have the:

function foo () { ... };

appear BEFORE you called it.




You still do in PHP5 if the function definition is in a conditional
block. Like his.

But apparently the script was thoroughly tested before he paid for it,
so that can't be the problem :-)

  -robin

Well if it was throughly tested then there wouldn't be errors.
And the error "is" because of the function called before declared.

Greets
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to ping a webserver with php?

2006-03-24 Thread Barry

Merlin wrote:

Hi there,

I do have a webserver (that also runns php 4.x) running which I would 
like to ping from an intranet server. In case that the webserver is down 
and therefore my webapp the php script which does the ping should send 
an e-mail which results in a message on my mobile.


Are there any commands for PHP which you can recommend for doing that?

The plan was to write a php file which does the ping and e-mail thing 
and execute it via cron every few minutes.


Can somebody give me a hint on the commands I could use for the ping?

Thanx, merlin

http://pear.php.net/manual/de/html/package.networking.net-ping.ping.html

Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Fwd: Re: WG: Bitte weiterleiten

2006-03-24 Thread Barry

Thomas Munz wrote:

Sorry!

Was mistakly commited, should go to the list in my address book but not here!


LOL

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: mysql query/$post problem

2006-03-27 Thread Barry

Mark wrote:

I havnt even tried this query but i know its wrong can anyone help!

How do you know it's wrong ? O_o


***
$query = "INSERT INTO users (AVATARS) VALUES ('$avname') WHERE id = 
$user_id";


This works only if the $avname is a STRING!


mysql_query($query);s

--^
This will cause an error.
That's why you should test scripts before you post em ...


mysql_close();

include("footer.html");
?>

**



I am trying to insert the value of $avname into the users table, into the 
avatar field. 

Yeah seems, so ;)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: protecting passwords when SSL is not available

2006-03-27 Thread Barry

Satyam wrote:

b) concatenate this value with the session_id() or whatever random you 
generated before


And where do you get that information?

Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Is there a mysql newsgroup like this php.general ANYONE?

2006-03-27 Thread Barry

Anasta wrote:

I need help with an insert using joins.

yes there is :)

http://lists.mysql.com/

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Three quickies anyone?

2006-03-27 Thread Barry

Ryan A wrote:

Have them go to the command line and type 'which php' and  it will
return the path.



The clients will probably not even understand what "command line" means, I
was thinking of doing something like this:

ask the client to enter the path to php on his server, if he does not know
the path then to download the script get_php_path.php from my site that
would contain



then they would then enter that valuebut is
$_SERVER["include_path"];
the correct thing to use?


Why don't you use the inbuild shell function of php to get the info from 
PHP itself?

http://de3.php.net/manual/de/function.escapeshellcmd.php

Since you can echo that also.

I just forgot what command it was but probably it helps you anyways :)

Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Irritating [EMAIL PROTECTED]

2006-03-27 Thread Barry

Ryan A wrote:

Anybody else getting these annoying auto responses from [EMAIL PROTECTED]
?

If yes, can someone email the list mod to delete his account or something,
or email me back the list mods email and I'll do it myself.

Thanks,
Ryan

Yeah, it's annoying >_>

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: cron via cPanel

2006-03-27 Thread Barry

tedd wrote:

Hi gang:

In cPanel one can schedule cron jobs.

In the command line box, what command do you enter to run a php script?

Thanks.

tedd

wget --spider http://www.url.com/blahblah.php

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: page expire error

2006-03-27 Thread Barry

suresh kumar wrote:

Hai,
i am facing one problem in my project.I am using 2
pages for search operation.

   In Search page 1:
i am having 3 fields say Company
name,state,country. when user enters search key in
their corresponding field and press submit button.
search result will be displayed in  another page
"Search result page".when i click back button in
browser toolbar.it is displaying error message as

"The page you requested was created using information
you submitted in a form. This page is no longer
available. As a security precaution, Internet Explorer
does not automatically resubmit your information for
you" .

 I am storing the field name in session.


That's because you use Forms.
The Explorer is just telling you that he don't will submit the posted 
formvars again.


Well the message is very selfexplaining, but probably not easy to 
understand for you because i suggest you don't speak english that well.


If you can live with some security problems use method="GET" rather than 
method="POST" this will give you no errors in this case probably.


Greets
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to ping a webserver with php?

2006-03-28 Thread Barry

Merlin wrote:

Hi,

that looks exactly like what I am looking for. Now there is just on 
problem:

I can't get pear running :-(

phpinfo tells me that I have compiled with pear:
Version 4.3.11 '--with-PEAR'
But there is no further entry inside teh output of phpinfo on pear.

What do you recommend? Do I have to install pear by hand, or would it 
help to install the newest 4.x tree of php which hopefully comes with pear?


I am not quite sure if it is in 4.x but 5.x has it in.

Probably PEAR isn't working because PEAR is complied but missing the 
packages?


Sorry i am not so very firm with PEAR.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: why is this newsroup server so slow?

2006-03-28 Thread Barry

Merlin wrote:

Hi there,

I used to be more often on news.php.net in former times. But now the 
server is
so incredibly slow?! I do get very often time outs and it takes ages to 
load the threads. Is there a possible misconfiguration of my newsreader, 
or is the server that slow?


Thank you for your help,

Merlin

More people probably?

Well my Thunderbird works fine so far. Just a few times a day i get 
timeouts.


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: object oriented syntax in php

2006-03-28 Thread Barry

Merlin wrote:

Hi there,

I do have problems with object oriented syntax as this is not familar to 
me.

There is following output:


object(net_ping_result)(11) { ["_icmp_sequence"]=>  array(1) { 
["61.117):"]=> string(1) "7" } ["_target_ip"]=>  string(9) "y2.php.ne" 
["_bytes_per_request"]=>  string(2) "64" ["_bytes_total"]=>  int(192) 
["_ttl"]=>  string(6) "_seq=2" ["_raw_data"]=>  array(7) { [0]=>  
string(72) "PING php.net (66.163.161.117) from 192.168.1.114 : 56(84) 
bytes of data." [1]=>  string(72) "64 bytes from y2.php.net 
(66.163.161.117): icmp_seq=1 ttl=47 time=211 ms" [2]=>  string(72) "64 
bytes from y2.php.net (66.163.161.117): icmp_seq=2 ttl=47 time=206 ms" 
[3]=>  string(0) "" [4]=>  string(31) "--- php.net ping statistics ---" 
[5]=> string(55) "2 packets transmitted, 2 received, 0% loss, time 
1008ms" [6]=> string(55) "rtt min/avg/max/mdev = 
206.299/209.139/211.979/2.840 ms" } ["_sysname"]=>  string(5) "linux" 
["_round_trip"]=>  array(3) { ["min"]=> string(7) "209.139" ["avg"]=>  
string(7) "211.979" ["max"]=>  string(5) "2.840" } ["_transmitted"]=>  
string(1) "2" ["_received"]=>  string(1) "2" ["_loss"]=> int(0) }


This Block is kinda hard to read. Would you mind to post something more 
formatted?


Thanks!

print_r($net_ping_result);

or something like that.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: object oriented syntax in php

2006-03-28 Thread Barry

Petar Nedyalkov wrote:

This is a result of print_r();

It would be better to have the class definition...


No it's var_dump() and without linebreaks and so >_>

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem with IE and not displaying the correct images...

2006-03-29 Thread Barry

Gregory Machin wrote:

Problem found ...
IE doesn't understand comments '//' in style sheets ..
so the line I had commented out refering to the background image in the
style sheet was over riding my code later in the page..


Not quite right.
Only // doesn't work

But /* COMMENT */ does

greets

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Array Question again

2006-03-29 Thread Barry

cybermalandro cybermalandro wrote:

Let me try this again.  I want to take an array that may look like this


Opening new Threads over and over don't do any good.
Please stick to your opened thread about that issue please.

Greets
    Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: A Problem!

2006-03-29 Thread Barry
Tom Wong (Yakang Accessories) wrote:
> Dear All:
>  
> 
> 
> -
> 例子A(使用HTML TAG)
> 
> 
> Send this file: 
> 
> 
> 
Here it should be  not 

Btw. most of the list don't speak Chinese so please Post your Problem in
English if you can because it would be a lot easier to help you.


-- 
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IP Address Filtering

2006-03-30 Thread Barry

Rahul S. Johari wrote:

Ave,

I have to say I absolutely love your idea! It¹s probably a solution for my
problem, at the same time, like the other guy said, freaking hilarious!!!
:0)

I think I¹ll probably write up a script that displays everything except
records with NULL as IP for regular audience... And displays all records
with NULL as IP for audience who¹s IP is recorded as NULL.

Thanks!


Could ipv6 make problems here?

If apache or similiar apps don't recognize it you also will get NULL.

Greets
    Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: upgrade of PHP failed

2006-03-30 Thread Barry

Merlin wrote:

Hi there,

I just tried to upgrade to the newest 4.x version from 4.3.11.

No trying to start apache I do get following error message:

Starting apache/usr/local/apache/bin/httpd: relocation error: 
.//usr/local/lib/php/extensions/debug-non-zts-20020429/upload_progress_meter.so: 
undefined symbol: upload_progress_register_callback

startproc:  exit status of parent of /usr/local/apache/bin/httpd: 127

This does not tell me anything.

My config looks like this:
 './configure' '--with-gd' '--with-freetype-dir=/usr/lib' 
'--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-jpeg-dir=/usr' 
'--with-png-dir=/usr/lib' '--with-zlib' 
'--with-apxs=/usr/local/apache/bin/apxs' '--enable-ftp' '--with-mysql' 
'--with-pdflib' '--with-xml' '--with-gettext' '--enable-sysvsem' 
'--enable-sysvshm' '--with-curl' '--enable-xslt' 
'--with-xslt-sablot=/usr/local/' '--enable-debug' '--with-PEAR' 
--with-xmlrpc



Can somebody give me a hint what has happened?

Thank you in advance, Merlin

Your config looks funny why do you have 2 times --enable-sysvem?
if you remove --enable-debug it might work.

looks like that debug module has an CRC error or something like that.

btw. wasn't there an installation list around here?

Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] redirect using php

2006-04-05 Thread Barry

Andrei wrote:

   document.location =
'http://where.to.go.com/example.php?param1=';


Wasn't it -> document.location.href ='www.example.com';
o_O ?

Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Creating a Photo Album

2006-04-07 Thread Barry

Paul Goepfert wrote:

Hi all,

I am postilng pictures up on a website.  So far I have a picture per
page. This will get not be very efficient as time goes on.  Is there
anyway that I can have one page with only the image updating?  Can
this be done in PHP.  If it can would someone explain it to me.  The
only thing I k.now how to do well in PHP is mysql queries and data
validatlion.

Thanks,
Paul

No PHP can't do something like that.
Problem is that PHP can't delete the output Buffer.

I think, but i am not quite sure, that this can be done with AJAX.
Also some Java-Applets are able to do stuff like that.

It will still be tough since you have to tell your browser somehow that 
he has to reload the image.

Not quite easy.

Greets
    Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: String /pattern formatting extraction question

2006-04-10 Thread Barry

Andy wrote:
Hi to all, 


I have the following pattern for a string:

text1 /ptext2 /otext3

Does it always look like that?
text1(whitespace)/ptext2(whitespace)/otext3

Then use explode to create an array from it
explode (" ",$stringpattern);


Now, I want to extract the text by "patterns" from this string by the following 
rule:

no pattern -> text1 (what is before /o or /p)
/p -> text2 (what is after /p)
/o -> text3 (what is after /o)

Here you can use ereg and foreach
foreach ($stringpattern as $key => $value)
  {
$variable = substr_count("/",$value);
if ($variable > 0) / has been found now extract the first two chars
  }

Or something like that ~


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: RADICORE ramework released

2006-04-13 Thread Barry

Tony Marston wrote:

Announcing the first public release of RADICORE, a Rapid Application
Development toolkit for building administrative web applications which
contains the following:

  a.. A true rapid application development framework which is based around
Transaction Patterns.
  b.. A dynamic Menu system.
  c.. A Role Based Access Control system.
  d.. An Audit Logging system.
  e.. An activity based Workflow system.
  f.. A Data Dictionary.
  g.. Facilities for Internationalisation.

It's even better than Ruby on Rails! Check it out at http://www.radicore.org


Locale is not defined in string '**UNDEFINED**'

Tried the demo account. Doesnt work *shrug*

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: RADICORE ramework released

2006-04-13 Thread Barry

Tony Marston wrote:
What do you mean "it doesn't work"? Do you mean my online demo, or when you 
try to run it on your machine? What are your settings? What language have 
you got defined in your browser? Where did you see the message "Locale is 
not defined in string '**UNDEFINED**'"


If you cannot provide more information I will not be able to solve this 
problem. Everybody else seems to be able to use it OK, so you must have some 
peculiar settings in your browser.


unfortunately not ^_^

Using Firefox 1.5 latest version standard settings.
On a winXP system.

I posted the error i got, so you are probably able to get that ^^

Greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: RADICORE ramework released

2006-04-13 Thread Barry

Tony Marston wrote:
"Barry" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]



Tony Marston wrote:

What do you mean "it doesn't work"? Do you mean my online demo, or when 
you try to run it on your machine? What are your settings? What language 
have you got defined in your browser? Where did you see the message 
"Locale is not defined in string '**UNDEFINED**'"


If you cannot provide more information I will not be able to solve this 
problem. Everybody else seems to be able to use it OK, so you must have 
some peculiar settings in your browser.


unfortunately not ^_^

Using Firefox 1.5 latest version standard settings.
On a winXP system.

I posted the error i got, so you are probably able to get that ^^




I can access it from my Windows XP PC using IE6, Firefox 1.5 and Opera 8.5 
without any problems. Any problems with locale are cased by having the 
language code in your browser set to something which cannot be matched up 
with the contents of the server's locale file. If it cannot find a match my 
software is supposed to keep the current default setting, whatever that is.


What language do you have set in your browser? Can you try my site again to 
see if it still fails.




It works like a charm now. it was set to UTF-8 ^_^

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: how to convert 0.5 to 0.50

2006-04-13 Thread Barry

Merlin wrote:

Hi there,

I am searching for a command on how to format 0.5 to 0.50

thanx for any help,

merlin

sprintf("%.02f",$string);
Or number_format()

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Spell Checker

2006-04-18 Thread Barry

Stut wrote:

BH.VN.Viswanath wrote:


> We need to check the spelling of a word which is actually a Domain
> name.
>
> For example we have to check the word "onlinetradeing". When
> checked with the spell checkers we are getting the words which are
> unrelated such as on, obliterating, incinerating, intruding etc.
> But exactly what we want was "online trading". So we would like to
> have the word to be split into phrases and check the spelling too.
> The normal spell checkers are just checking the words in the
> dictionary but not splitting the word into phrases.



Ok, this is gonna show how bored I've been today, maybe I need to find a 
more interesting job!!


   http://dev.stut.net/words/

There's a link there to the source of the guts. Hope it helps you.

-Stut

lol. Awesome =)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Last one for today! Pager problem

2006-04-18 Thread Barry

tedd wrote:

At 9:53 AM -0500 4/18/06, Jay Blanchard wrote:


[snip]
My pager does everything but when I hit any of the links for the pages
it
doesn't show any results.

It can be seen here (alothough the page doesn't seen to submit on the
remote
host. Any ideas why??
[/snip]

I think it might be coder error, but that's just me. Anyone else?



Hmmm considering that his pager does everything, maybe he should have it 
wrote the code.


Anyone else?

tedd


OWZIE WOWZIE!
TOO MUCHY CODY!
EYEZ HURTY!

OWZIE WOWZIE!

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: sprintf() oddity

2006-04-18 Thread Barry

Chris Boget wrote:

What's going on here:
 
$number = 50.1234567890;

echo sprintf( '%.05f', $number );

result: 50.12346
 
$number = 5.1234567890;

echo sprintf( '%.05f', $number );

result: 5.12305
 
$number = 5000.1234567890;

echo sprintf( '%.05f', $number );

result: 5000.0
 
Why isn't it formatting the decimals properly? And apparently losing

some?
 
Running PHP 4.3.11 on Windows Server 2003 box.
 
thnx,

Chris


Because you can either work with large Numbers before point or after.
both doesn't work.

And on top of that, PHP works intern with double typed vars.

That's causing the problem here.

probably round() and number_format() will have better outcomes.

Test that :)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] a funny variable composition out of my daily programmer life

2006-04-19 Thread Barry

He really didn't knew what he hase done when he came to this varname.

$_POST["f-art-nlid"];

burn baby :D *boom* xD
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: no offense to Rasmus... are you kidding me

2006-04-19 Thread Barry

Stut wrote:

Matt Todd wrote:


But of course, that is just conjecture. I'm just saying that I think
he has vested interest and will be least of all willing to make the
shift in thought (even if he did think it held some merit).
 



I didn't read that article too closely, but I would appreciate *brief* 
answers to these questions...


In what way does PHP not allow development in the style that has 
unfortunately become known as Web 2.0? Why does it need to change? If 
you were "in charge" of PHP development what would you be doing to make 
it "better"?


As a PHP developer with too many years experience to mention I am 
curious about specifically why you are of the opinion that it's behind 
the times.


-Stut

Right, That's why ppl use PHP more than Perl/CGI for example.
It's because PHP is easier to understand and to code (for most ppl).
And when something else comes that is more useful than PHP and will come 
in more handy than it than PHP will take his place in order.

That's how stuff goes.
I don't think it's that important to debate it that much.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: programming contests as a way of finding/evaluating offshore talent...

2006-04-19 Thread Barry

bruce wrote:

hi..

i'm looking for opinions on the "worth" of programming contests as a way of
judging the talent of potential software developers...

any thoughts/pros/cons would be appreciated..

and yeah.. i know this is a little off topic.. but some of us here deal with
these issues.. if you know of a better email list for this kind of question,
let me know, and i'll move it to there..

thanks in advance!

-bruce
A good programmer is somone who can (mostly) easily find answers to 
given problems.
You can then start looking on how somone programmed, how good it was 
tested, how good it's commented and documentated.


If a contest is in that way, i think it really has a worth.
But the most problems are that the contests are too specific.

For example. If a Bank would start something like that, you surely 
should have a knowledge on how bills and such are done and so on.



--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Pushing Vars into $_SESSION

2006-04-20 Thread Barry

Chris Grigor wrote:


The method behind the madness here, is that I am only pulling the data 
once from the db throughout the whole session. This means that all the 
user info is available on every page they visit. I can also
then identify on each page that loads if a user has signed in and a 
session is present. Do you think I am going about this in the wrong way? 
What would you suggest is a better idea???


Chris


All the user info? Wouldn't it be enough to have a link on that User?
So that you can get the information you need rather than have all stored 
in a Session.

Btw. what would you do if the User starts updating his Profile.
Wouldn't it be easier to just update the Data-Field of the User rather 
than updating session and Data-Field?


--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Execute script and redirect

2006-04-20 Thread Barry

Peter Lauri wrote:

Best groupmember,

 


I have a form that is being filled out. This is the process:

 


1.  Fill out form and click submit
2.  Script validates data
3.  Data is being sent to external source via Web Service
4.  A file is being downloaded (redirects to files location)

 


The problem is that #3 is taking around 15 seconds to complete because the
Web Service is very slow. I would like to run #3 in the background and
directly jump to #4.

 


Is this possible?



Yes. you might use the shell execution for that OR fopen() without url 
restriction and send the commands to the file.


There are lots of ways to do that...

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Best way to start a CRON

2006-04-20 Thread Barry

Hello Everyone!

What would be the best way to start a PHP Script via CRONJOB?
Should i use the 'php' command or use curl or lynx or something to
open that URL?

The Script does a MySQL query, collects data and sends it via E-Mail 
every monday morning to the recipient.


Any help will be appriciated :)

Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Best way to start a CRON

2006-04-20 Thread Barry

Pure Web Solution wrote:

I run several PHP scripts via CRON in the following way:

put the following in the top of the php script:

#!/usr/local/bin/php -q (linux system - location of php bin)

and in the CRONTAB I have the following:

10 1 * * * root /usr/local/bin/php -q /script/CRONexport.php

the -q supress HTML headers.

hope this helps!


Yes it does. Thanks :)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: POST arrays?

2006-04-20 Thread Barry

William Stokes wrote:

Hello,

How to post an array with associated values?

This works ok



But if I post it to another form with this:

">

And print there with:

print_r($arr_siirt_jouk);

prints: Array

So how can post the values forward?

Thanks
-Will 

serialize() unserialize()

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] POST arrays?

2006-04-20 Thread Barry

William Stokes wrote:

No other way?




Over sessions or saving as file and loading it in the following page.

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Serveral forms in a page.

2006-04-25 Thread Barry

William Stokes wrote:

Hello,

This "might be" more HTML stuff but anyway...

Yeah, anyway who cares if it belongs in here or not.

I have several forms in a page which is ok otherwise but the reset buttons 
doesn't clear anything that is queried from DB and printed to the text 
fields. Any idea how to create Reset buttons that clear the fields even when 
the data is not from user input? Or do I have to create reset buttons that 
are actually submit buttons and play with variables after that or something 
like that? Javascript is the way I don't want to go...


Yeah very nice cars can you get in Ohio.
Ever been there?

Ah, what? It doesn't belong to your post?
Ah shame on me, but anyway ...
cookie?
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: phpmailer problem with spam score

2006-04-25 Thread Barry

Merlin wrote:

Hi there,

I am operating page where user receive a message which they do
have to confirm. The message does have about 5 links inside to give the 
user administration to his postings.


Now recently I discovered that the message does not go through to 
everybody since the spam score is 4.2! This is of course not what I want 
as some users are not able to confirm their postings without this e-mail.


I am using the newest phpmailer class available and this is what the 
header tells me:


X-Spam: high
X-Spam-score: 4.2
X-Spam-hits: BAYES_50, EXTRA_MPART_TYPE, FORGED_RCVD_HELO, HTML_MESSAGE,
  HTML_TAG_BALANCE_BODY, MIME_HTML_MOSTLY, SARE_OBFU_PART_ING

Is there something I can do about this?

Thank you for any suggestions.

Merlin

- Tell the people to put your domain on the whitelist or the specific
  mailadress it comes from.
- Use plaintext only mails

The scroe is so high because of the links.

Greets
Barry
--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How to convert a string( "23/04/2006") to a string "23042006" in javascript?

2006-04-25 Thread Barry

Pham Huu Le Quoc Phuc wrote:

Hi you!
I am a newbie to web programming,  I have a following problem:
I have a string: "23/04/2006", want to convert it become 23042006 in
javascript.
Thanks.

YOU! Hi!

And you are a newbie to mailing lists as it seems.
This is a PHP mailing list so only stuff related to PHP should be asked.
You are having a problem with JAVASCRIPT so you should ask in a 
JAVASCRIPT mailing list or either start reading MANUALS and 
DOCUMENTATIONS because they provide LOTS of INFORMATION about the things 
you are SEARCHING for.


But i will give you a hint: replace()

Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: forms and dynamic creation and unique field names

2006-04-27 Thread Barry

Jason Gerfen schrieb:
I have come upon a problem and am not sure how to go about resolving 
it.  I have an web form which is generated dynamically from an imported 
file and I am not sure how I can loop over the resulting post variables 
within the global $_POST array due to the array keys not being numeric. 
Any pointers are appreciated.



foreach?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: php <-> js (was Javascript Navigation)

2006-04-27 Thread Barry

tedd schrieb:

Hi gang:

Gang?

1. A way to send information from js to php and have php act upon it.

Java


2. A way to send information from php to js and have js act upon it.

Java



--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to get the absolute path of an included file?

2006-04-27 Thread Barry

Brad Bonkoski schrieb:



Bing Du wrote:


Hello,

Here are the two scripts.  The result is 'var is' rather than 'var is
foo'.  My suspect is I did not set the file path right in 'include'.  So
in file2.php, how should I get the actual absolute path it really gets 
for

file1.php?  Is it stored in some environment variable or something?  I'd
appreciate any help.

file1.php

==

==

file2.php

==
 

global $var; //you have to declare it as a global otherwise it will 
assume a local value



nonsense. Only for functions and such.

If it's in the same folder why dont you use include ("file2.php"); ?

Otherwise youse pathes like ../subfolder/folder
Only if you really want to load stuff thats not at the web directory use 
full pathes like /path/to/folder


Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] forms and dynamic creation and unique field names

2006-04-27 Thread Barry

Jason Gerfen schrieb:

Martin Zvarík wrote:


Jason Gerfen wrote:

I have come upon a problem and am not sure how to go about resolving 
it.  I have an web form which is generated dynamically from an 
imported file and I am not sure how I can loop over the resulting 
post variables within the global $_POST array due to the array keys 
not being numeric. Any pointers are appreciated.



"You will never be ready for me."
~ Me

Hahah...


HAHA...


O_o

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] I want to write a Multi-threaded PHP Application

2006-04-27 Thread Barry

Gonzalo Monzón schrieb:

I forgot to put some final note into my last message.

PHP can be good for a lot of things, but not really for other. 

Yeah true (o_O)

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php <-> js (was Javascript Navigation)

2006-04-28 Thread Barry

Robert Cummings schrieb:

On Thu, 2006-04-27 at 11:09, Barry wrote:

tedd schrieb:

Hi gang:

Gang?


You know... Scooby, Shaggy, and Mary-Jane.

ah, ic.



1. A way to send information from js to php and have php act upon it.

Java

... Sucks.

Because?



2. A way to send information from php to js and have js act upon it.

Java

... Sucks :)

Because?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: php <-> js (was Javascript Navigation)

2006-04-28 Thread Barry

tedd schrieb:

At 5:09 PM +0200 4/27/06, Barry wrote:

tedd schrieb:

Hi gang:

Gang?


Gang, group, clan, community, organization, hive, pod, assembly, 
biocenosis -- what do you want to be called?


By my name normally. And if you adress everyone i prefer "everyone"


Show me.


function jstojava()
  {
 // sending stuff to the applet
  }


Javaapplet containing Java that gives infos to PHP through an openened 
PHP socket. PHP giving stuff back



Java executes a JS with the vars given by php




--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   >