php-general Digest 18 Nov 2009 22:19:01 -0000 Issue 6449

Topics (messages 299901 through 299918):

Re: tracking forwarded emails using PHP
        299901 by: Angus Mann
        299903 by: Andrew Ballard
        299904 by: Ashley Sheridan
        299905 by: Andrew Ballard
        299906 by: Ashley Sheridan

Re: How to call a vc++ dll from a HTML form
        299902 by: Ashley Sheridan

Noob question: Making search results clickable.
        299907 by: Paul Jinks
        299908 by: Gary Smith
        299909 by: Paul M Foster
        299910 by: Shawn McKenzie
        299911 by: Gary Smith
        299912 by: Shawn McKenzie

dynamic meta tag and title app?
        299913 by: Jack S
        299918 by: Daevid Vincent

Re: Lightweight web server for Windows?
        299914 by: O. Lavell
        299915 by: O. Lavell
        299916 by: O. Lavell

Support for your boning!The Bat! (v3.99.24) Professional
        299917 by: tgrantham.elreno.k12.ok.us

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message --- 1. Is possible. Google the term web-bug. Be prepared that it will only work if the recipient has a HTML enabled email reader AND allows downloading of images. Be prepared also that every time the email (including forwarded emails) are viewed your server gets a hit. Might equal alot of hits. Just embed an image with a unique filename (tiny or invisible if you want) in the email and make it's source your server. Then track requests for that image.

2. Is impossible. It just is. The best you could do is track requests for the image as in 1 above and notice the different IP addresses, and *assume* it was forwarded but there are lots of other explanations other than forwarding.


----- Original Message ----- From: "Angelo Zanetti" <ang...@elemental.co.za>
To: <php-gene...@lists.php.net>
Sent: Wednesday, November 18, 2009 6:32 PM
Subject: [PHP] tracking forwarded emails using PHP


Hi all,

I want to develop a newsletter system, where by users can create newsletters
and send them to recipients, that's not a problem.

I want to be able to track certain things:

1. When an email is opened. I think this can be done with an img tag where
the src is a php script. We can then track when that script is called and
from whom.

2. Track if the email was forwarded, not sure how this is done but it should
be possible any ideas?

I basically need advice on the second point and to know that the first point
I am heading in the correct direction.

Please send any links if you wish, that will help.

Thanks in advance.

http://www.elemental.co.za
http://www.wapit.co.za
http://www.chaperonsa.co.za
http://www.tour2africa.com





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



--- End Message ---
--- Begin Message ---
On Wed, Nov 18, 2009 at 4:30 AM, Angus Mann <an...@angusmann.com> wrote:
> 1. Is possible. Google the term web-bug. Be prepared that it will only work
> if the recipient has a HTML enabled email reader AND allows downloading of
> images. Be prepared also that every time the email (including forwarded
> emails) are viewed your server gets a hit. Might equal alot of hits. Just
> embed an image with a unique filename (tiny or invisible if you want) in the
> email and make it's source your server. Then track requests for that image.
>

In various environments, I use G-mail's web service, Thunderbird and
Groupwise, and all 3 disable images by default specifically to prevent
exactly what you are suggesting. I suspect many other mail clients do
the same, not to mention a lot of people use text-only e-mail clients
that cannot display images.

Most people I know don't want to be tracked like this, and if they
find you are doing it they will simply remove themselves from your
mailing list and/or direct the messages to the trash.


Andrew

--- End Message ---
--- Begin Message ---
On Wed, 2009-11-18 at 09:04 -0500, Andrew Ballard wrote:

> On Wed, Nov 18, 2009 at 4:30 AM, Angus Mann <an...@angusmann.com> wrote:
> > 1. Is possible. Google the term web-bug. Be prepared that it will only work
> > if the recipient has a HTML enabled email reader AND allows downloading of
> > images. Be prepared also that every time the email (including forwarded
> > emails) are viewed your server gets a hit. Might equal alot of hits. Just
> > embed an image with a unique filename (tiny or invisible if you want) in the
> > email and make it's source your server. Then track requests for that image.
> >
> 
> In various environments, I use G-mail's web service, Thunderbird and
> Groupwise, and all 3 disable images by default specifically to prevent
> exactly what you are suggesting. I suspect many other mail clients do
> the same, not to mention a lot of people use text-only e-mail clients
> that cannot display images.
> 
> Most people I know don't want to be tracked like this, and if they
> find you are doing it they will simply remove themselves from your
> mailing list and/or direct the messages to the trash.
> 
> 
> Andrew
> 


I  think that people removing themselves from mailing lists is a little
extreme. I wouldn't remove myself just because I thought I was being
tracked.

There is another way to track reading of emails though. Microsoft
Outlook created something called read receipts. Users still have to
accept the read receipt to be sent to the sender, so it might be a
slightly more obtrusive way of finding out who read what, and afaik, it
only works on the first read of an email. I don't know exactly how they
are formed, but I believe it is some form of special attachment to the
email that is recognised by some email clients.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Wed, Nov 18, 2009 at 9:07 AM, Ashley Sheridan
<a...@ashleysheridan.co.uk> wrote:
> I  think that people removing themselves from mailing lists is a little 
> extreme. I wouldn't remove myself just because I thought I was being tracked.

You might not, but some people will. One (of many) of the problems
with that approach is that the same technique has been used by
spammers to validate which addresses actually get delivered and read.

> There is another way to track reading of emails though. Microsoft Outlook 
> created something called read receipts. Users still have to accept the read 
> receipt to be sent to the sender, so it might be a slightly more obtrusive 
> way of finding out who read what, and afaik, it only works on the first read 
> of an email. I don't know exactly how they are formed, but I believe it is 
> some form of special attachment to the email that is recognised by some email 
> clients.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

This is just an additional header or two at the top of the mail
message. I'm not positive, as I've never used them, but look up
"Read-Receipt-To" and "Disposition-Notification-To". This approach
allow the user to have total control over whether they wish to notify
you. Keep in mind that 1) not all clients recognize these headers, and
2) many people again will choose to say "No".

Andrew

--- End Message ---
--- Begin Message ---
On Wed, 2009-11-18 at 09:23 -0500, Andrew Ballard wrote:

> On Wed, Nov 18, 2009 at 9:07 AM, Ashley Sheridan
> <a...@ashleysheridan.co.uk> wrote:
> > I  think that people removing themselves from mailing lists is a little 
> > extreme. I wouldn't remove myself just because I thought I was being 
> > tracked.
> 
> You might not, but some people will. One (of many) of the problems
> with that approach is that the same technique has been used by
> spammers to validate which addresses actually get delivered and read.
> 
> > There is another way to track reading of emails though. Microsoft Outlook 
> > created something called read receipts. Users still have to accept the read 
> > receipt to be sent to the sender, so it might be a slightly more obtrusive 
> > way of finding out who read what, and afaik, it only works on the first 
> > read of an email. I don't know exactly how they are formed, but I believe 
> > it is some form of special attachment to the email that is recognised by 
> > some email clients.
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> 
> This is just an additional header or two at the top of the mail
> message. I'm not positive, as I've never used them, but look up
> "Read-Receipt-To" and "Disposition-Notification-To". This approach
> allow the user to have total control over whether they wish to notify
> you. Keep in mind that 1) not all clients recognize these headers, and
> 2) many people again will choose to say "No".
> 
> Andrew
> 


Yeah, it's a shame, spammers are ruining a lot of good things about
email. The problem really is that email as a standard is pretty old and
has quite a few exploitable areas. I guess until email2 these things
will continue to plague us!

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
On Wed, 2009-11-18 at 15:54 +1030, James McLean wrote:

> On Wed, Nov 18, 2009 at 3:21 PM, Peter <pet...@egrabber.com> wrote:
> > Thanks to All.
> >
> > I want to call a vc++ dll from a HTML form. The dll need to be triggered on
> > a button click in the HTML form.
> >
> > I want to access the dll from the client end(javascrript) without using the
> > server.
> >
> > Tell me whether its possible to call dll directly or through any interface ?
> >
> > Please provide me your valuable inputs to solve this issue.
> 
> What does this have to do with PHP?
> 
> Oh, and it's a bad idea. Don't do it...
> 


Like I mentioned in the other thread you opened where you were asking
the same question, if this is at all possible, it will only work on
Internet Explorer, if at all. If you look at the browser statistics held
by the W3C you'll notice that IE usage is in the decline as well.

Also, if this is possible, users will be asked whether they want this
insecure DLL running ramshod all over their system, and I'd hazard a
guess that the majority of users would decline such an offer.

Just out of curiosity, what does your DLL actually do? I'd be highly
suspect of any site wanting to do something like this, and would feel no
qualms about reporting it as having highly suspicious activity.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Hi all

I'm building a fairly basic php/mySql site but I'm running into
problems due to my total lack of experience. I have a database of
videos - each has a title, transcript, description and one or more
topics. So far I can search the database by topic (using a drop-down
menu), like this:

<?php
$result = mysql_query("SELECT title FROM videos WHERE topic1= '$topic'");

while($row = mysql_fetch_array($result))
  {
  echo $row['title'];
  echo "<br />";
  }
?>

Basic, but it works. What I'd like now is to make the search results
clickable so clicking them leads to a page showing all the details of
that video. I have a page "video_display.php" set up, ready to display
the details from the database, but how do I connect the two?

Thanks in advance

Paul

--- End Message ---
--- Begin Message ---
Paul Jinks wrote:
Hi all

I'm building a fairly basic php/mySql site but I'm running into
problems due to my total lack of experience. I have a database of
videos - each has a title, transcript, description and one or more
topics. So far I can search the database by topic (using a drop-down
menu), like this:

<?php
$result = mysql_query("SELECT title FROM videos WHERE topic1= '$topic'");
Hi - first up, make sure that you're passing clean input. It's worth learning about security from the start. As you've mentioned below that you're using PHP, you can do this by making sure $topic has been put through mysql_real_escape_string() - it's not ideal, but it's better than nothing[1].
while($row = mysql_fetch_array($result))
  {
  echo $row['title'];
  echo "<br />";
  }
?>
What you'd probably be better doing is having something like this:

printf("<a href='video_display.php?id=%s'>%s</a>", $row["id"], $row["title"]);

And changing your query accordingly.

Obviously, you'd need video_display.php to accept GET input in the form of id= as well.

Cheers,

Gary

[1] It's not a magic bullet in so far as it doesn't stop SQL injection.


--- End Message ---
--- Begin Message ---
On Wed, Nov 18, 2009 at 03:04:13PM +0000, Paul Jinks wrote:

> Hi all
> 
> I'm building a fairly basic php/mySql site but I'm running into
> problems due to my total lack of experience. I have a database of
> videos - each has a title, transcript, description and one or more
> topics. So far I can search the database by topic (using a drop-down
> menu), like this:
> 
> <?php
> $result = mysql_query("SELECT title FROM videos WHERE topic1= '$topic'");
> 
> while($row = mysql_fetch_array($result))
>   {
>   echo $row['title'];
>   echo "<br />";
>   }
> ?>
> 
> Basic, but it works. What I'd like now is to make the search results
> clickable so clicking them leads to a page showing all the details of
> that video. I have a page "video_display.php" set up, ready to display
> the details from the database, but how do I connect the two?

Replace your query with:

"SELECT title, id FROM videos WHERE topid1 = '$topic'"

or whatever index you have to select a particular video from your table.

Replace your echo statement above with:

echo "<a href="video_display.php?video_id=$row[id]">$row[title]</a>";

Then ensure that video_display.php is set up to fetch the video whose ID
is passed to it via the GET parameter.

All this assumes I understood what you're getting at. Which is
questionable. ;-}

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
Gary Smith wrote:
> Paul Jinks wrote:
>> Hi all
>>
>> I'm building a fairly basic php/mySql site but I'm running into
>> problems due to my total lack of experience. I have a database of
>> videos - each has a title, transcript, description and one or more
>> topics. So far I can search the database by topic (using a drop-down
>> menu), like this:
>>
>> <?php
>> $result = mysql_query("SELECT title FROM videos WHERE topic1= '$topic'");
>>   
> Hi - first up, make sure that you're passing clean input. It's worth
> learning about security from the start. As you've mentioned below that
> you're using PHP, you can do this by making sure $topic has been put
> through mysql_real_escape_string() - it's not ideal, but it's better
> than nothing[1].
>> while($row = mysql_fetch_array($result))
>>   {
>>   echo $row['title'];
>>   echo "<br />";
>>   }
>> ?>
>>   
> What you'd probably be better doing is having something like this:
> 
> printf("<a href='video_display.php?id=%s'>%s</a>", $row["id"],
> $row["title"]);
> 
> And changing your query accordingly.
> 
> Obviously, you'd need video_display.php to accept GET input in the form
> of id= as well.

For the first piece Gary has it right, but your query needs to include
the id also.

$result = mysql_query("SELECT id, title FROM videos WHERE topic1=
'$topic'");

For the second piece, in video_display.php, you'd do something like this:

$id = (int)$_GET['id'];
$result = mysql_query("SELECT * FROM videos WHERE id=$id LIMIT 1");

if($result) {
    $row = mysql_fetch_array($result);

    echo $row['title']."<br />";
    echo $row['description']."<br />";
    echo $row['title']."<br />";
    // etc...
} else {
    die("Invalid id");
}

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Shawn McKenzie wrote:
Gary Smith wrote:
And changing your query accordingly.
For the first piece Gary has it right, but your query needs to include
the id also.
Yeah, as I mentioned, he'd need to change the query accordingly, either to select id,title or select *

Cheers,

Gary


--- End Message ---
--- Begin Message ---
Make sure to reply all...

Paul Jinks wrote:
> Thanks to everyone for replying, it's much appreciated. Thanks
> especially for the final piece of the puzzle, Shawn, I don't think I
> was going to find it on my own - the display I have in mind is a
> little different, but I think I can figure it out. Will check all this
> out and let you know how I get on.
>
> Paul
>
> On Wed, Nov 18, 2009 at 3:33 PM, Shawn McKenzie <nos...@mckenzies.net> wrote:
>   
>> Gary Smith wrote:
>>     
>>> Paul Jinks wrote:
>>>       
>>>> Hi all
>>>>
>>>> I'm building a fairly basic php/mySql site but I'm running into
>>>> problems due to my total lack of experience. I have a database of
>>>> videos - each has a title, transcript, description and one or more
>>>> topics. So far I can search the database by topic (using a drop-down
>>>> menu), like this:
>>>>
>>>> <?php
>>>> $result = mysql_query("SELECT title FROM videos WHERE topic1= '$topic'");
>>>>
>>>>         
>>> Hi - first up, make sure that you're passing clean input. It's worth
>>> learning about security from the start. As you've mentioned below that
>>> you're using PHP, you can do this by making sure $topic has been put
>>> through mysql_real_escape_string() - it's not ideal, but it's better
>>> than nothing[1].
>>>       
>>>> while($row = mysql_fetch_array($result))
>>>>   {
>>>>   echo $row['title'];
>>>>   echo "<br />";
>>>>   }
>>>> ?>
>>>>
>>>>         
>>> What you'd probably be better doing is having something like this:
>>>
>>> printf("<a href='video_display.php?id=%s'>%s</a>", $row["id"],
>>> $row["title"]);
>>>
>>> And changing your query accordingly.
>>>
>>> Obviously, you'd need video_display.php to accept GET input in the form
>>> of id= as well.
>>>       
>> For the first piece Gary has it right, but your query needs to include
>> the id also.
>>
>> $result = mysql_query("SELECT id, title FROM videos WHERE topic1=
>> '$topic'");
>>
>> For the second piece, in video_display.php, you'd do something like this:
>>
>> $id = (int)$_GET['id'];
>> $result = mysql_query("SELECT * FROM videos WHERE id=$id LIMIT 1");
>>
>> if($result) {
>>    $row = mysql_fetch_array($result);
>>
>>    echo $row['title']."<br />";
>>    echo $row['description']."<br />";
>>    echo $row['title']."<br />";
>>    // etc...
>> } else {
>>    die("Invalid id");
>> }
>>
>> --
>> Thanks!
>> -Shawn
>> http://www.spidean.com
>>
>>     
>
>   

--- End Message ---
--- Begin Message ---
Hello All,

Does anyone have a reference to a program that may be out there to
help with using a single header.php for a site, but then dynamically
loads different keywords , titles etc based on what page is including
the header file?

Sample:
If home page include it knows the title and other variables would be
home, about us would be about etc.

-- 
Thanks!
Jack

--- End Message ---
--- Begin Message ---
I usually just use some JS in the footer.php of the page to go back and
change the title based upon other stuff, say the user's name or whatever:

<script language="JavaScript" type="text/javascript">
parent.document.title = "<?= PRODUCT_NAME ?> :: <?= $PAGE_TITLE ?>"; 
</script>

> -----Original Message-----
> From: Jack S [mailto:jacklistm...@gmail.com] 
> Sent: Wednesday, November 18, 2009 8:30 AM
> To: php-gene...@lists.php.net
> Subject: [PHP] dynamic meta tag and title app?
> 
> Hello All,
> 
> Does anyone have a reference to a program that may be out there to
> help with using a single header.php for a site, but then dynamically
> loads different keywords , titles etc based on what page is including
> the header file?
> 
> Sample:
> If home page include it knows the title and other variables would be
> home, about us would be about etc.
> 
> -- 
> Thanks!
> Jack
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
Jonathan Tapicer wrote:

> Try nginx (http://nginx.net/), very light, has a Windows binary
> distribution and can be configured easily for PHP.

Sorry for my late reply, and thank you for this suggestion. I am now 
trying nginx and it looks very promising so far. It seems to be both a 
very simple and sufficiently capable little web server. There is only a 
little problem that it doesn't run as a service in Windows, but there may 
be solutions for that.


--- End Message ---
--- Begin Message ---
Manuel Lemos wrote:

> Hello,
> 
> on 11/15/2009 07:00 PM O. Lavell said the following:

[..]

>> My initial thought was to install Lighttpd under Cygwin, but perhaps I
>> would be missing out on some great little server program that I have
>> not yet heard about.
> 
> I use lighttpd on Linux, but there seems to exist a Windows version as
> well:
> 
> http://www.lighttpd.net/

I know that, yes, and I have used it once or twice on Linux. That's why I 
thought of installing it on Windows as well.

> I have written about using it with PHP here:
> 
> http://www.phpclasses.org/blog/post/69-13-rules-to-optimize-your-Web-
> site-performance.html

Interesting. And thank you also for your reply. I may return to the idea 
of installing lighttpd, but for now I am giving nginx a spin.


--- End Message ---
--- Begin Message ---
Daevid Vincent wrote:

> Out of curiosity, if this is just for coding, and you're already a Linux
> guy, why not just install a lightweight linux flavor on the laptop
> instead of WF/XP?

This is a rather prehistoric (Windows 98 era) laptop, a Compaq Armada 
1700 with 266 MHz CPU. Somewhere along the way it was rescued from total 
uselessness when it received a RAM upgrade from 64 to 192 MB. It has been 
lying on a shelf in my study for years.

It does run Linux and I tried several distros. There are certainly 
lightweight window managers that I could live with too (like BlackBox). 
But running Firefox within those limited capabilities is really too much 
to ask. Firefox has obviously become a memory hungry, slow starting 
beast. Another annoyance would be the cooling fan: to keep it from 
blowing non-stop at full force I would have to compile and consequently 
maintain my own 2.6 kernel (something peculiar about this specific laptop 
that is never going to be fixed in Linux). Then someone told me to try 
"Windows Fundamentals for Legacy PCs" and I was pleasantly surprised. It 
is about as fast as or perhaps even faster than Windows 98 ever was and I 
am running both IE8 and Chrome. Not super fast but quite usable, must 
only remember not too open too many tabs in either browser.

I could certainly throw the old laptop away, buy a new(er) one that can 
run any software. But somehow I find it satisfying that with only a few 
adaptations I can still use an almost 10 year old computer and not miss 
out on too much modern frills. I guess I am eccentric like that.

Also, it is not for daily use. I have two desktop computers and a server 
for that. This is for when I have to go by train or something.

Essentially it is just an extra plaything.

Speaking of playing: it doesn't play Youtube videos, just chokes on them. 
Oh well. Hope your curiosity is satisfied ;)


--- End Message ---
--- Begin Message ---
Hi <php-gene...@lists.php.net>!

??????a? ?a???????, ?????????? ??a???p?????? ??????? ??? ???p????? ??a??????a ? 
???p??, ?? ????a?? ??? ?a? ?a?? ???? ??a?????? SexFunsClub.com. ????p? ?a? ?? 
????? ????? ?????? ????? ??p?? ?pa???? a???????a. ?a? ?? ?p?????? ?pa???? 
?p???, ?????? ???? ?????? ???? ?p????. ????p? ?? ?p???? ?p??????? ?a ?a?? 
SexFunsClub.com ? ?a?? ????? ??a??????a ?p???????? ????? ? ???????????.



?m?EBT?0?S8Ls??hvYvo?WdD??t??kx???p???P???????G??2o??K4H?tQ?X???z??aIQWVx?B???l??S????ipo?D?Zbr?5??T?N?o??R?Z??N3??AJcl????Q????o??5?S?Lz?T??GD????0l?g?????j??1?A?Ki??kX3?ckCb?AVFg?d?H??EN?M???????????Q??qB?rT?????1Ml?r?2cd?????HfqboxO4??m??G???b?0Q????y????d????g?Y???Xo???
H???z??Fa?Mb???2w????Ql446???BtB?AjS?C?R??SS???sY?MUO??b2g?l?y?2?????1r????qA?OH????aLY?????h??N?Lq7C???ZIo?4??w???Xf?pBp??2oN??1?W?????X??6?ov?????g?????4n??H?
K?k

--- End Message ---

Reply via email to