Solved

how to send a log entry every time a page is printed

Posted on 2008-06-23
22
386 Views
Last Modified: 2013-12-07
Our users will select a page to print, from a menu of pages in an IE6+ browser.

We can embed a code in each page giving details of that page.

When the user prints the page we want it to somehow pick up a unique identifier for that user, and add it [along with a date\time stamp] to the unique page code. Probably the easiest way to do this would be to install a cookie on each computer. (As we know each specific user\computer we are in the position to put unique cookies or similar on each computer.)

Then, if the person prints the page, we want the above log entry to go to us at our remote location.

The result would be like a customised version of typical web access statistics. We're not averse to using a commercial product if someone can suggest one. We'd prefer not to have masses of emails automatically sent to us unless there is some way of automatically collating them.

The collated log entries are only wanted monthly, so perhaps could be stored on each computer and sent once a month. A problem with this is that there is money involved. We wouldn't want users wiping the log files. And if the log entries were stored in a cookie there is a risk of it being deleted by a user's anti-spyware software.

Is there an easy way to do this? Or is it a monster?




0
Comment
Question by:NEILPH
  • 14
  • 7
22 Comments
 
LVL 1

Expert Comment

by:Neoific
ID: 21856833
There is a jscript event that can handle this, "onbeforeprint."  However, it is ONLY for IE.  Therefore I don't know if this would be a viable option.
0
 

Author Comment

by:NEILPH
ID: 21862622
I didn't know about onbeforeprint and in this case the possibly more useful onafterprint.

Fortunately, we are specifying that IE6+ be used, so that makes these a good option. I'll try them now and get back to you.

Of course, triggering a log entry is only part of the solution. Getting log entries back over the internet is the other part.

I'll wait a couple of days to see if there are any suggestions on that before I award points.

Thanks so far.
0
 
LVL 4

Expert Comment

by:snrudda
ID: 21864755
PHP support "sessions" (see http://www.php.net/manual/en/ref.session.php ), so it will be pretty easy to trace uses. IE with its onbeforeprint and onafterprintevent will do the rest of magic (say, put a 1x1 transparent gif on the page and set some js code to be executed by onbeforeprint event that replaces src of that image with the same image URL that contains user session id; say, first image src set "one.gif" and on onbeforeprint it will be set to "one.gif?id=sessionid&info=abouttoprint"). To have the whole picture set another code to set src to say "one.gif?id=sessionid&info=printed" on onafterprintevent.

Keep records on sessions on the server side and log every request to one.gif with id set to something, this way you'll know who, when and how much time was about to print your page and who and when finished their intention.
0
 

Author Comment

by:NEILPH
ID: 21869714
snrudda, that's a great answer. Let me digest it and get back to you.
0
 

Author Comment

by:NEILPH
ID: 21880527
snrudda. I'm working through your suggested solution. Although I am an experienced programmer I have little knowledge of PHP. But I'm learning fast.

I see a problem. According to "PHP For Dummies" "PHP stores session variables in a file on the server, in \tmp on Unix or Linux."

I need to be able to retrieve the session records, but we have a public ISP. I doubt that they would let us modify their php.ini to redirect our session records to a directory within our site.

Is there any way with your solution that we can direct the session records to our own directory or send a duplicate copy to it?

0
 

Author Comment

by:NEILPH
ID: 21881094
snrudda

I still see that there would be the above problem trying to access the log files back on our ISP's server.

However, I have mocked up a dummy webpage using your suggestions and I think it works. But do you think it works?

I've put the code in a snippet and you can view it in action at http://www.isc.co.nz/sol1/afterprint.php.

I presume it will send a log entry to our ISP's server, but I can't tell. I need to be able to see what's going on while I'm debugging. You'll see I have <?php echo SID?> in the page code for this purpose. Strangely, it showed SID in the browser but NOT when I added the img code. I don't know why.


<?php

  session_start();

?>  

<html>

<head>

<title>Testing afterprint session</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>
 

<body bgcolor="#FFFFFF" text="#000000" onafterprint="alert('Done printing!')">
 
 

<p>An invisible image is placed here on the page... <img src="spacer.gif?id=sessionid&info=printed" >

</p>
 

<p>If you print the page you will see the alert "Done printing".</p>
 

<p>

<?php echo SID?>

</p>
 

</body>

</html>

Open in new window

0
 
LVL 4

Expert Comment

by:snrudda
ID: 21881916
By browser crashed by the time I hit Submit to post a reply for you so I retype it quickly hope no mistakes will be made.

Read on sessions in PHP, the sessions vars are stored on server but you access it via $_SESSION array and the array is populated with per-use: session vars every time you do session_start (not exactly that but OK for a first approach). If you set $_SESSION['my_lovely_var'] to something its content will be persistent between sessions.

Ok, lets do some trick. Remove all session_* calls from your page, and put the code attached to this post to one.php. Code is written on the fly and kind of 'to be on the safe side' but should work. You'll play with it anyway I believe :) Put simple 1x1 transparent gif named one.gif there.

Use is simple:

<img src="one.php?" width="1" height="1" border="0" id="isprint">

and

<body onbeforeprint="document.getElementsByID['isprint'].src='one.php?action=beforeprint'"
onafterprint="document.getElementsByID['isprint'].src='one.php?action=afterprint'" ...>

<?
 

if (isset($_GET['action'])) {

  if (!isset[$_SESSION['ip']]) {

    $_SESSION['ip'] = $_SERVER["REMOTE_ADDR"];

    $_SESSION['before'] = 0;

    $_SESSION['after'] = 0;

  }

  if (!isset[$_SESSION['before']]) {

    $_SESSION['before'] = 0;

    $_SESSION['after'] = 0;

  }

  if (!isset[$_SESSION['after']]) {

    $_SESSION['after'] = 0;

  }

  switch($_GET['action']) {

    case 'beforeprint':

      $_SESSION['before']++;

      break;

    case 'afterprint':

      $_SESSION['after']++;

      break;

  }

  if ($fh = @fopen('print.log', 'a')) {

    fwrite($fh, sprintf ("%s\t%s: %d--$d\n"), 

        date('r'),

        $_SESSION['ip'],

        $_SESSION['before'],

        $_SESSION['after']

      )

    );

    fclose($fh);

  }

}
 

$fname = 'one.gif';

header ('Content-Type: image/gif');

header ('Cache-Control: must-revalidate, post-check=0, pre-check=0');

if (file_exists($fname)) {

  header ('Content-Length: ' . filesize($fname));

  readfile ($fname);

}
 

?>

Open in new window

0
 

Author Comment

by:NEILPH
ID: 21889197
snrudda

Once again that's an awesome answer. Let me get my newbie head around it.

I'll get back to you in a couple of days.

Thanks again.
0
 

Author Comment

by:NEILPH
ID: 21889480
I'm not sure what you mean by "put the code attached to this post to one.php".

Do you mean that I should start your snippet of code like this...

<?one.php
0
 
LVL 4

Expert Comment

by:snrudda
ID: 21953699
Oops, sorry I must be missed your answer.

I mean you need to put code attached to my post above to the file named one.php in some dir under your site's root. Then modify your page like this (see code in this post) - note that the only thing you need is to put img element with id="isprint" (width, height and border will also be useful but not necessary), and add onbeforeprint and onafterprint event handlers to body element.
<html>

<head>

<title>Testing afterprint session</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body bgcolor="#FFFFFF" text="#000000"  onbeforeprint="document.getElementsByID['isprint'].src='one.php?action=beforeprint'"

onafterprint="document.getElementsByID['isprint'].src='one.php?action=afterprint'">

 

 

<p>An invisible image is placed here on the page... <img src="one.php?" id="isprint" width="1" height="1" border="1" alt="" title=""></p>

 

<p>If you print the page you will see a log entry on the event on the server.</p>

  

</body>

</html>

Open in new window

0
 

Author Comment

by:NEILPH
ID: 21958129
That's OK. I've been off work sick for a week. Thanks for your new suggestion. I'll get onto it.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:NEILPH
ID: 21979931
I've run your solution but can't tell if its successfully because I can't see our log entries at our ISP's server. I've asked them if there's any way we can access our logs. (Another ISP we have, lets us see our log there anytime.)

Or do you have a suggestion for how to view our log without getting our ISP to help?

Ideally, would it be possible to redirect or duplicate the log entry to append to a log.txt file in one of our site folders?

0
 

Author Comment

by:NEILPH
ID: 21980190
I just got my ISP to supply our logs. Here are the entries when I ran your solution. I've put the code below in the snippet.

222.154.81.144 - - [11/Jul/2008:17:27:17 +1200] "GET /rss_tests/hone.htm HTTP/1.1" 304 -
222.154.81.144 - - [11/Jul/2008:17:27:17 +1200] "GET /rss_tests/one.php? HTTP/1.1" 200 150

It looks to me as if printing page hone.htm hasn't produced a log entry. [Mmm, maybe I should call it hone.php ?]

Where am I going wrong?


**************** hone.htm ********************
 

<html>

<head>

<title>Testing afterprint session</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body bgcolor="#FFFFFF" text="#000000"  onbeforeprint="document.getElementsByID['isprint'].src='one.php?action=beforeprint'"

onafterprint="document.getElementsByID['isprint'].src='one.php?action=afterprint'">

 

 

<p>An invisible image is placed here on the page... <img src="one.php?" id="isprint" width="1" height="1" border="1" alt="" title=""></p>

 

<p>If you print the page you will see a log entry on the event on the server.</p>

  

</body>

</html>
 

******************************************

************** one.php ********************
 

<html>

<head>

<title>Testing afterprint session</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body>

<?

 

if (isset($_GET['action'])) {

  if (!isset[$_SESSION['ip']]) {

    $_SESSION['ip'] = $_SERVER["REMOTE_ADDR"];

    $_SESSION['before'] = 0;

    $_SESSION['after'] = 0;

  }

  if (!isset[$_SESSION['before']]) {

    $_SESSION['before'] = 0;

    $_SESSION['after'] = 0;

  }

  if (!isset[$_SESSION['after']]) {

    $_SESSION['after'] = 0;

  }

  switch($_GET['action']) {

    case 'beforeprint':

      $_SESSION['before']++;

      break;

    case 'afterprint':
 
 

      $_SESSION['after']++;

      break;

  }

  if ($fh = @fopen('print.log', 'a')) {

    fwrite($fh, sprintf ("%s\t%s: %d--$d\n"), 

        date('r'),

        $_SESSION['ip'],

        $_SESSION['before'],

        $_SESSION['after']

      )

    );

    fclose($fh);

  }

}

 

$fname = 'one.gif';

header ('Content-Type: image/gif');

header ('Cache-Control: must-revalidate, post-check=0, pre-check=0');

if (file_exists($fname)) {

  header ('Content-Length: ' . filesize($fname));

  readfile ($fname);

}

 

?>  

</body>

</html>

Open in new window

0
 
LVL 4

Expert Comment

by:snrudda
ID: 21981588
In fact code line

fopen('print.log'...

is to open file print log in the current dir (where script is itself) so if URL to the script is http://server.com/path/one.php, then you can read you log by typing http://server.com/path/print.log as URL.

There no much difference if you can call you page as .html or .php, the .php file will be processed by PHP and the .html won't (if the webserver configured in some default way). If there is no <? ?> parts in the php file then PHP will do nothing on it except for spending time for looking for php code in it.

You misunderstand me a bit. Here is what you need to do: put html code from the below to the page.html file (note that border="0" and not 1).
Put one.php to one.php file as it is, with no  elements around (there was no session_start by the start and there were [] instead of () brackets). Put transparent gif file size 1 by 1 pixel to the same dir with name one.gif.
Now you need to be sure dir where you script is located can be writable by webserver. Ask your hoster for that or just try, if you won't see and print.log file then contact hoster.

Note that IE fires up the onbeforeprint event several times (three in my tests, but may be dependent on IE version and service packs installed), so you'll find some repeating in your log. Just ignore it while you parse the logs later.
=== page.htmnl ===

<html>

<head>

<title>Testing afterprint session</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>
 

<body bgcolor="#FFFFFF" text="#000000"

onbeforeprint="document.getElementById('abcd').src='one.php?action=beforeprint'"

onafterprint="document.getElementById('abcd').src='one.php?action=afterprint'">
 
 

<p>An invisible image is placed here on the page... <img src="one.php?" id="abcd" width="1" height="1" border="0" alt="" title=""></p>
 

<p>If you print the page you will see a log entry on the event on the server.</p>
 

</body>

</html>
 
 

=== one.php ===

<?
 

session_start();
 

if (isset($_GET['action'])) {

  if (!isset($_SESSION['ip'])) {

    $_SESSION['ip'] = $_SERVER["REMOTE_ADDR"];

    $_SESSION['before'] = 0;

    $_SESSION['after'] = 0;

  }

  if (!isset($_SESSION['before'])) {

    $_SESSION['before'] = 0;

    $_SESSION['after'] = 0;

  }

  if (!isset($_SESSION['after'])) {

    $_SESSION['after'] = 0;

  }
 

  switch($_GET['action']) {

    case 'beforeprint':

      $_SESSION['before']++;

      break;

    case 'afterprint':

      $_SESSION['after']++;

      break;

  }
 

  if ($fh = @fopen('print.log', 'a')) {

    fwrite($fh, sprintf ("%s\t%s: %d--$d\n",

        date('r'),

        $_SESSION['ip'],

        $_SESSION['before'],

        $_SESSION['after']

      )

    );

    fclose($fh);

  }

}
 

$fname = 'one.gif';

header ('Content-Type: image/gif');

header ('Cache-Control: must-revalidate, post-check=0, pre-check=0');

if (file_exists($fname)) {

  header ('Content-Length: ' . filesize($fname));

  readfile ($fname);

}
 

?>

Open in new window

0
 

Author Comment

by:NEILPH
ID: 21987514
I tested that and it appeared to work as my log entries show...

222.154.81.100 - - [12/Jul/2008:14:54:12 +1200] "GET /rss_tests/page.html HTTP/1.1" 304 -
222.154.81.100 - - [12/Jul/2008:14:54:12 +1200] "GET /rss_tests/one.php? HTTP/1.1" 200 43
222.154.81.100 - - [12/Jul/2008:14:54:17 +1200] "GET /rss_tests/one.php?action=afterprint HTTP/1.1" 200 43
222.154.81.100 - - [12/Jul/2008:14:54:17 +1200] "GET /rss_tests/one.php?action=beforeprint HTTP/1.1" 200 43
222.154.81.100 - - [12/Jul/2008:14:57:27 +1200] "GET /rss_tests/print.log HTTP/1.1" 404 314

...but no file rss_tests/print.log was created. I browsed for it and looked via Dreamweaver, but it isn't there. I think that as you suggest, my ISP isn't letting me write to that directory. I have another project with a similar problem; I'm getting errors when trying to cache external files, and errors trying to make chmod("/path/", 0777); work. On the other hand my ISP has just helped me write a PHP script that archives external .html files, see demo script in the snippet. So maybe the problem isn't that my ISP won't let me write to the folder.

I looks like I'll have to talk to my ISP. I'll let you know what happens.

But we're on the right track. Thanks greatly for your help so far.
 

<?php
 

$outputFile = "incoming/ee" . date("ymd") . ".html";

$URL        = "http://news.google.com/news?ned=us";
 

$incoming = fopen($URL,        "r");

$outgoing = fopen($outputFile, "w"); 
 

while ($response = fread($incoming, 1024) ) {

	fwrite($outgoing, $response);

}

fclose($incoming);

fclose($outgoing);

?>

Open in new window

0
 

Author Comment

by:NEILPH
ID: 21995274
I tried a little trick at my ISP that allowed me to run page.html and print, creating a print.log.

I shifted page.html, one.php and one.gif into a folder that I knew my ISP had given file writing permissions to.

The result: success, printing a page added entries to a file, print.log.

Here are log entries...
In print.log:
Mon, 14 Jul 2008 13:45:16 +1200      222.154.80.49: 1--
Mon, 14 Jul 2008 13:45:17 +1200      222.154.80.49: 2--
In the ISP server log:
222.154.80.49 - - [14/Jul/2008:13:45:16 +1200] "GET /test/incoming/one.php?action=afterprint HTTP/1.1" 200 43
222.154.80.49 - - [14/Jul/2008:13:45:17 +1200] "GET /test/incoming/one.php?action=beforeprint HTTP/1.1" 200 43

Two problems:
1. a minor problem: the beforeprint entry appears AFTER the afterprint entry.

2. the printlog entries currently don't contain any identifying data that I can control. Remember, the brief says "When the user prints the page we want it to pick up a unique identifier for that user, and add it [along with a date\time stamp] to the unique page code."

On this basis, looking at your code I thought the log might show 'abcd' as per your getElementById('abcd').

The bottom line is, if each afterprint log entry can include a 'username\pagename' string var I construct somewhere on page.html we've succeeded 100%

0
 
LVL 4

Expert Comment

by:snrudda
ID: 21997384
Well, I don't know user's username (yes you can put his/her name to say $_SESSION['username'] variable which will be persistent and can be used as username source. My script provided above identifies  user by IP address (you're working within LAN, as you can control which browsers are there, so it shouldn't be too hard to understand which user has specified IP address). The line

$_SESSION['ip'] = $_SERVER["REMOTE_ADDR"];

is there right for that purpose: it takes value of _SERVER array that contains client IP (REMOTE_ADDR, 'remote' from the point of view of the server = client).

Appears that this like won't work in your setup for some reason (say, you're using PHP as CGI or something, consult your site's hosting).

The problem about
> 1. a minor problem: the beforeprint entry appears AFTER the afterprint entry.
is that these requests may come too fast one by one, and may be processed by different processes of web server. So you may see situation when line about 'after' state flushes to the disk actually before line on 'before' state. This is the problem of parsing, you can filter or swap these line later on producing stats.
0
 

Author Comment

by:NEILPH
ID: 22021370
I think we have success. I'll get your comments on this and then award you the points.

As you suggested, I asked our ISP whether there could be anything on their server that stopped variables 'ip', 'before' and 'after' appearing in print.log.

He changed the following line in your script, and the variables now appear in print.log: he changed   fwrite($fh, sprintf ("%s\t%s: %d--$d\n",
to  fwrite($fh, sprintf ("%s\t%s: %d--%d: %s\n",  

I've included the current one.php as a snippet. You'll see that as a test I've added the variable     $_SESSION['username'] = "Smith, Wellington, NZ";

I've put the log entries below. You can see how
        $_SESSION['before'],
        $_SESSION['after'],
incremented each time the page was printed within a session. That's nice. In fact, thanks for the good work. You've created a good solution.

Log entries for 4 printings
Thu, 17 Jul 2008 09:18:12 +1200 122.57.45.38: 0--1: Smith, Wellington, NZ
Thu, 17 Jul 2008 09:18:12 +1200 122.57.45.38: 1--1: Smith, Wellington, NZ

Same browser session:
Thu, 17 Jul 2008 09:40:23 +1200 122.57.45.38: 0--1: Smith, Wellington, NZ
Thu, 17 Jul 2008 09:40:24 +1200 122.57.45.38: 1--1: Smith, Wellington, NZ

Thu, 17 Jul 2008 09:40:47 +1200 122.57.45.38: 1--2: Smith, Wellington, NZ
Thu, 17 Jul 2008 09:40:48 +1200 122.57.45.38: 2--2: Smith, Wellington, NZ

Thu, 17 Jul 2008 09:49:47 +1200 122.57.45.38: 2--3: Smith, Wellington, NZ
Thu, 17 Jul 2008 09:49:48 +1200 122.57.45.38: 3--3: Smith, Wellington, NZ




<?
 

session_start();
 

if (isset($_GET['action'])) {

  if (!isset($_SESSION['ip'])) {

    $_SESSION['ip'] = $_SERVER["REMOTE_ADDR"];

    $_SESSION['before'] = 0;

    $_SESSION['after'] = 0;

    $_SESSION['username'] = "Smith, Wellington, NZ";

  }

  if (!isset($_SESSION['before'])) {

    $_SESSION['before'] = 0;

    $_SESSION['after'] = 0;

  }

  if (!isset($_SESSION['after'])) {

    $_SESSION['after'] = 0;

    $_SESSION['username'] = "Brown, Wellington, NZ - printed";

  }
 

  switch($_GET['action']) {

    case 'beforeprint':

      $_SESSION['before']++;

      break;

    case 'afterprint':

      $_SESSION['after']++;

      break;

  }
 

  if ($fh = @fopen('print.log', 'a')) {

    fwrite($fh, sprintf ("%s\t%s: %d--%d: %s\n",   &&     fwrite($fh, sprintf ("%s\t%s: %d--$d\n",

        date('r'),

        $_SESSION['ip'],

        $_SESSION['before'],

        $_SESSION['after'],

        $_SESSION['username']

      )

    );

    fclose($fh);

  }

}
 

$fname = 'one.gif';

header ('Content-Type: image/gif');

header ('Cache-Control: must-revalidate, post-check=0, pre-check=0');

if (file_exists($fname)) {

  header ('Content-Length: ' . filesize($fname));

  readfile ($fname);

}
 

?>

Open in new window

0
 
LVL 4

Accepted Solution

by:
snrudda earned 500 total points
ID: 22022647
Oh, yes, that was silly mistyping. Sorry for that messing up with source code ($ instead of %) - I must be edited it in the text field here in browser before submitting the snippet and put $ without too much thinking.

Glad the solution suits your needs. And frankly I'm still really wonder how did you managed to make every user to use IE specified versions without any addons like Greasemonkey for IE - and if you're on LAN then why do you need to count printings. Hope the precession of such a counting will be OK for your purpose.
0
 

Author Closing Comment

by:NEILPH
ID: 31477746
Thanks. The techo guy at our ISP spotted the error. It's the third time he's fixed some code for me when we thought it was a fault with his hosting. I feel embarrassed, but he's a real asset.

I designing for IE6+ purely because it is the most widely used browser, so it's easy to stipulate that it must be used to view page.html. And IE6+ before\afterprint events seemed like a godsend for creating a log entry whenever a user prints.

The really valuable thing you have done is to show me the mechanism for creating log entries whenever a particular event is fired. I'm looking forward to experimenting with it to create log entries when other events occur.

That way, maybe I can broaden the use to FireFox by putting a form on the page, with a "PRINT" button, that prints AND creates a log entry. That could get over the fact that FireFox appears [as far as I know] not to have an event like before\afterprint.

In fact, it would run with any browser.

What do you think?

Thanks again.
0
 
LVL 4

Expert Comment

by:snrudda
ID: 22057555
Neilph,

in fact you can make some more cross-browser solution by using the fact that you can hide or show element on the page by using CSS aimed for print (see say http://www.alistapart.com/stories/goingtoprint/ for more on that). The idea is to have some element (e.g. 1x1 image like in our discussion above) that is hidden while the page displayed on screen (media=screen) but is shown when user send it to printer (media=print). This way looks tricky a bit and may involve some JS code as well but it should be OK for every modern browser like Firefox or Safari as well as modern IEs.

Say in the body of the page you put



and add something like

onLoad="document.getElementById('printcount').style=''"

to the  element. Then you have two CSS blocks:




So the img element is hidden due to style="display: none", but as soon as page are loaded the img style sets to empty string so the only rule to apply is CSS depending on media. While you see page on screen, the image hidden due to #printcount { display: none; } and when you print it image start to load as #printcount { display: block; } apply.
0
 

Author Comment

by:NEILPH
ID: 22100466
Sorry I didn't notice you'd added this suggestion. You're absolutely right. It could be multi-browser if done using media="print". Maybe you'd like to have a go at converting your before\afterprint version of page.html\one.php for an extra 500 points. I'll open a related question now.

I'm also opening another related question for you to see if you can solve a problem that another expert can't solve. It's to do with your one.php. I should have asked you instead but I wasn't ready to ask when I last contacted you, and I've only just noticed that it's possible to ask related questions.

The problem is that in one.php [or any other .php session] I cannot successfully read a persistent cookie [containing the user's name] into a session variable. I need it to include in the log entry.

Thanks again.

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Printing Remote desktop using a local Printer 8 32
Phone Dialer 5 38
regex expression 9 23
Web Reply Form - PHP with Upload 4 21
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now