Search found 8 matches

by elim
Tue Sep 27, 2011 10:51 am
Forum: PHP - Code
Topic: javascript encription and php decription
Replies: 13
Views: 1126

Re: javascript encription and php decription

Thanks Eric! and Mordred. I learned a lot through your discussion. Yes I just like to find something free since the project I'm working on is for free to an org. I think many sites with no SSL for reasons, if the data have nothing to do with real private info etc, why bother using SSL? Depends on ad...
by elim
Mon Sep 26, 2011 5:20 pm
Forum: PHP - Code
Topic: javascript encription and php decription
Replies: 13
Views: 1126

javascript encription and php decription

I'm looking for the solution of secure login without ssl. And I think the following idea should be reasonable: using a randomly generated key (maybe depend to current time and some custom logic) and javascript to encript the password and send the result to server. in server php script, using the sam...
by elim
Mon Sep 26, 2011 5:06 pm
Forum: PHP - Code
Topic: Is it possible to call javascript function from php
Replies: 1
Views: 352

Is it possible to call javascript function from php

Suppose server php script got some data from client and, is it possible call a javascript function,
pass some value to the function and assign the javascript return to a php variable?

Thanks
by elim
Wed Sep 14, 2011 8:45 pm
Forum: PHP - Code
Topic: Any way to interpret function inside of <<< string
Replies: 3
Views: 1122

Re: Any way to interpret function inside of <<< string

Thanks a lot Weirdan! This exactly what I'm looking for. It can also pass variables $a = 1; $b = 2; function nm($a,$b){ return pow($a+$b, 2); } class FunctionCaller { public function __call($name, $args) { return call_user_func_array($name, $args); } } $func = new FunctionCaller; echo <<<MSTR We'd l...
by elim
Tue Sep 13, 2011 5:54 pm
Forum: PHP - Code
Topic: Any way to interpret function inside of <<< string
Replies: 3
Views: 1122

Any way to interpret function inside of <<< string

$myFile = "cm123.mp3"; echo <<<FileRow <A href={$myFile}>The Record</A> FileRow; Works well. But function myFile(){ return "cm123.mp3"; } echo <<<FileRow <A href={myFile()}>The Record</A> FileRow; Not working. Any trick to call the function inside of the string? Thanks
by elim
Sat Oct 24, 2009 11:06 pm
Forum: PHP - Code
Topic: how to properly destroy an array of images
Replies: 2
Views: 73

how to properly destroy an array of images

We know

Code: Select all

ImageDestroy($anImg);
Is the way of destroy an image created by php code. But if I have an array of such images,
what's the proper way of destroy the array (give all the corresponding memories back to the system)?
Thanks for your anwser.

Can I just do
unset($imgArray);
???
by elim
Mon Jun 08, 2009 3:07 pm
Forum: PHP - Code
Topic: Why my php4 graphic counter with cookie stop working?
Replies: 2
Views: 397

Re: Why my php4 graphic counter with cookie stop working?

actually i found the solution: SetCookie() should specify the path carefully
by elim
Fri Jun 05, 2009 6:18 pm
Forum: PHP - Code
Topic: Why my php4 graphic counter with cookie stop working?
Replies: 2
Views: 397

Why my php4 graphic counter with cookie stop working?

I used to use my counter.php in static html pages like this: <img src=/myCounter/counter.php> It works just fine but after upgrade to php5, the script below stop reading cookie and so increases count everytime I refresh the page. Could anyone give me some hit what's wrong? The code is here:   <?php ...