|
install Wamp server, it has MySQL and Apache. and it installs setting automatically. you need only to work on PHP.
|
|
|
|
|
Dear All.
I want get data from url, I use HTTP_Request to post parameter and get data from url. If url not using token then get OK, but If url using token then get data not OK.
Please help me get data from url have use token.
thanks very much.
nothing
|
|
|
|
|
hello everybody
i registered for a very good free webhosting with nice subdomain which offers POP3 IMAP and SMTP with SSL/TLS and many other features.
when i created my webmaster e-amil, the control panel gives me the feature to make a test.
so i did and it worked very good.
so the next step was to test this in a php script and it worked good too, here it is:
--------------------
<?php
$from = "webmaster@my-subdomain";
$to = "my-other-email@external-domain";
$subject = "testing";
$body = "testing the mail function";
if(mail($to,$from,$subject,$body)) {echo "success\n";}
else {echo "failure\n";}
?>
--------------------
now i want send emails with ssl authentication and after build a customized client for sending mails and viewing reiceived mails. i searched for that and i found some interresting things, and i understood that they used some third party packages, like phpmailer, curl and pear's mail which need to be installed and modify the php.ini file for ssl library, allowing to send via external servers like gmail which is very nice thing and i know that i can use it with my subdomain server as well.
the problem is that i don't have access to the php.ini file, and even if i can, i don't want do that because i know that i have already everything installed with my registration, and the proof was the two test e-mails.
what i can't know is which package my registeration is using. i give some config infos of my subdomain that i got from phpinfo() to help you :
i have the incoming and outgoing servers with their corresponding ports for both secured and non secured mail services (servers used for ssl and non-ssl are different).
PHP Version 5.3.3
---------------------------------
Registered Stream Socket Transports : tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
---------------------------------
mail.add_x_header On On
---------------------------------
zend.enable_gc On On
---------------------------------
cURL
cURL support enabled
SSL Yes
Protocols tftp, ftp, telnet, dict, ldap, ldaps, http, file, https, ftps, scp, sftp
---------------------------------
IMAP
SSL Support enabled
Kerberos Support enabled
---------------------------------
openssl
OpenSSL support enabled
OpenSSL Library Version OpenSSL 1.0.0-fips 29 Mar 2010
OpenSSL Header Version OpenSSL 1.0.0-fips 29 Mar 2010
---------------------------------
Sockets Support enabled
---------------------------------
in some tutos, they say that php4 and later (which the case here) comes with built-in pear mail package, but i dont know how to verify that. i think it is an issue, no ?!!!!
so i tried a code (How to Send Email from a PHP Script Using SMTP Authentication By Heinz Tschabitscher) but it gives me a require_once error, because this :
require_once "Mail.php";
it told me that the file deosn't exist in the include path or something like that.
sorry if my message is very long but i want make it clear and easy for anyone want help me.
thank you for your effort.
|
|
|
|
|
hi
i have 4 fields like as bellow
1.start date
2.start time
3.end date
4.end time
by using above fields how can i get difference in hours in php project
any body can help me.
thank you.
|
|
|
|
|
A little RTFM goes a long way. Open up the PHP manual (online if you were too stupid or lazy to download a free copy) and type "date difference" into the search box.
Work with DateTime and DateInterval objects.
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
that is not happening so that only posted.
|
|
|
|
|
??????
Try this link[^] then.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
<?php
$date1 = "2012-10-04 22:45:00";
$date2 = "2013-12-05 13:44:01";
$diff = abs(strtotime($date2) - strtotime($date1));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));
$hours = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24)/ (60*60));
$minuts = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24 - $hours*60*60)/ 60);
$seconds = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24 - $days*60*60*24 - $hours*60*60 - $minuts*60));
printf("%d years, %d months, %d days, %d hours, %d minuts\n, %d seconds\n", $years, $months, $days, $hours, $minuts, $seconds);
die;
?>
|
|
|
|
|
What is your project... how you help me if i help u
@n!L
|
|
|
|
|
If you searched on google you would find 1000's of solutions. this is copied from PHP site
<?php
$td = time_diff($timestamp1-$timestamp2);
$td .= ($td=="now")? "":" ago";
echo $td;
function time_diff($s){
$time = get_post_time('G', true, $post);
$s = time() - $time;
if($s>=1) {
$td = "$s sec";
}
if($s>59) {
$m = (int)($s/60);
$s = $s-($m*60);
$td = "$m min"; if($s>1) $td .="s";
}
if($m>59){
$hr = (int)($m/60);
$m = $m-($hr*60);
$td = "$hr hr"; if($hr>1) $td .= "s";
if($m>0) $td .= ", $m min";
}
if($hr>23){
$d = (int)($hr/24);
$hr = $hr-($d*24);
$td = "$d day"; if($d>1) $td .= "s";
if($d<3){
if($hr>0) $td .= ", $hr hr"; if($hr>1) $td .= "s";
}
}
return $td;
}
?>
I wish I could believe there is an after life.
|
|
|
|
|
Hello guys;
In .NET environment, you could deploy you web app to your local server with compilation (which hides all code-behind files, i.e, your server-scripts).
How can I achieve the same in my WAMP/PHP environment.
The essence of this is to protect my application from being modified by anyone else behind me.
Thank you in anticipation of your prompt response.
"Success at anything will always come down to this: focus & effort."
|
|
|
|
|
You cant. php compiler does not create anyother form of file
I wish I could believe there is an after life.
|
|
|
|
|
Thank you for the response.
|
|
|
|
|
You could use one of the byte compilers that exist for PHP. ZendEncoder would be one example. This one is commercial if you use it commercially but there are free alternatives as well.
Other option: host the application on your own server and don't grant access to the source code.
|
|
|
|
|
Hi people,
Can anyone please tell me what is the best and fastest way to learn PHP? I am referring to if someone has a link to some nice tutorial or a nice book which is available online. Thanks!.
ps. How long do you think it could take to learn it?
best regards.
|
|
|
|
|
Given that you have not learned how to use Google yet, I would say quite a long time.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Very smart reply right? I'd give you an appropriate answer but I won't as I am on a public forum, so I will restrain myself from this - and don't tell you what you actually deserve.
As for the question, Google would not help here - because I was looking for an expert advice; meaning, there maybe lots of books on the internet, but I was asking for your (or the audiences more precisely; your answer I have already received and it was quite unhelpful) as to which book is "nice"/good.
best regards.
modified 18-Sep-12 21:26pm.
|
|
|
|
|
Stephan A. wrote: Very smart reply right? Not really, but it is based on the reasonable assumption that you did not bother to read the posting guidelines[^], nor did you bother to do some basic research into the learning tools that can easily be found by doing this[^].
In your original question you asked:
Stephan A. wrote: Can anyone please tell me what is the best and fastest way to learn PHP? OK, the answer is simple do what I suggested, and start studying.
Stephan A. wrote: a link to some nice tutorial or a nice book which is available online. Same answer, Google finds lots.
Stephan A. wrote: ps. How long do you think it could take to learn it? How can anyone give a valid answer to such a question? You may be a very fast learner or the dumbest person on the planet; there is no way that we could judge.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Good answer. Both posts upvoted
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
|
|
|
|
|
Thanks, it's interesting how the OP did not actually refer to his original question when attacking me for not answering "what I asked for".
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I think you should actually cut him some slack, what'd you expect from someone who asked how to learn *PHP*?
Full-fledged Java/.NET lover, full-fledged PHP hater.
Full-fledged Google/Microsoft lover, full-fledged Apple hater.
Full-fledged Skype lover, full-fledged YM hater.
|
|
|
|
|
Andrei Straut wrote: I think you should actually cut him some slack I did, he now has a link to a Google search result containing lots of stuff about PHP. Whether it is useful or not I could not say.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Quote: I did, he now has a link to a Google search result containing lots of stuff about PHP. Whether it is useful or not I could not say.
Well that's my point. There maybe lots of books on the internet and tutorials, but I was not willing to spend my time on reading a mediocre one. Rather as I said I wanted to be directed to a good book on this subject - and that is basically what I asked for.
As for the comments of the second person named Andrei: no comments.
best regards.
|
|
|
|
|
|
Thanks.
It was not my intention to engage in some heated debates, just I get surprised sometimes how people can "insult" you or deduce things like whether you know how to use google or not etc.
Thanks for the book anyway, but I think I won't be concentrating on PHP anymore. changed my plans. if i need it i know now where to start from.
best regards.
|
|
|
|