Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

 

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help.

 
Thread Tools
Old 04-25-2007, 09:29 AM   #1
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
Help: Info needed

Hello all,

I am wondering if anyone can point me to some software that does the following:

I place an image (jpg, gif, whatever) on a website (not hosted by me, but I have access to) and on my own hosted website, can view all if the IP addresses (resolved or not) that have viewed that image.

So basically it is working the same as viewing referring images for files anytime the page loads with that image on it, but I need to see IP addresses instead of the referring URL. In a sense it is just a hit logger for the image.

It would be especially nice if it could simply filter those out to it's own log file.

Thanks in advance!
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-26-2007, 09:44 AM   #2
Angelo22
Writer
 
Angelo22's Avatar
 
Industry Role:
Join Date: Feb 2007
Posts: 3,123
well, you can put the image on a definite webpage, and then just check on the IPs of those who look at that page, no?
__________________
MAKE MORE MONEY FROM YOUR WEB TRAFFIC - 15% BONUS

And contact me if you need high quality translating and writing work done - angelo22 (AT) gmail (DOT) com
Angelo22 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-27-2007, 06:36 AM   #3
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
Thanks for the reply

The problem with that is I don't have access to server logs on the other server, and they also don't allow php or java/javascript in just the html itself.

Any thoughts anyone? I know there are some real smart and crafty people on this board.
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-27-2007, 06:51 AM   #4
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,091
Put the image only on your server. Have the page on the other server pull the image from your server.

Then you have all the hits in your logs.

If you want to keep it separate, how many visited your server versus the oother server, then make a copy of the pic and have the other server reference the copy.

.
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-27-2007, 03:15 PM   #5
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
Thanks, what software will tell me the IP address of the computer calling the image from my server? So far all I have seen just tell me the referring url.
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-27-2007, 04:45 PM   #6
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,091
Quote:
Originally Posted by DrCocker View Post
Thanks, what software will tell me the IP address of the computer calling the image from my server? So far all I have seen just tell me the referring url.
Most web logs record the ip, referer and a bunch of other good stuff. So, if you have direct access to the logs, you can get it there.
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-27-2007, 04:47 PM   #7
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,091
If you don't hace access to the logs on your server then you can put a little script out on your server to pull the image when the other server calls for it. In that script you could capture the ip address.


Who is your host and what log analyzer are they giving you access to your logs through?

.
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 04-29-2007, 03:57 PM   #8
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
I am renting space through a friend who is hosting. He rents from some place in NL I believe, but I don't know the name offhand.

There is an old version of Webalizer on there that I have access to by default, (but it doesn't show me IP addresses accessing specific files such as an image, just the referring URL) but if I could find a good one, I could install it myself. On my server I am allowed to use php/javascript/etc., but no ASP/ASP.NET etc.

I'd really appreciate if you could point out a specific analyzer or simple little script that would do this. For some reason it doesn't seem very difficult at all, but it is eluding me.
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 02:22 PM   #9
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
* bump *
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 02:36 PM   #10
aidantrent
beep
 
Industry Role:
Join Date: Nov 2005
Location: West Coast
Posts: 236
As sarettah said, you'll need to host the image on a server which gives you access to the logs. Dreamhost would be one example, but just about any will do. Then grep the log for the image file name, and you'll be able to see everyone who visited the page.
__________________
JustPicsPlease - Search millions of porn pics
(Or thousands of porn tubes, if that's your style.)

Both sites are desktop- and mobile-friendly.
aidantrent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 03:12 PM   #11
donborno
Confirmed User
 
Join Date: Jan 2007
Location: Vienna, Austria
Posts: 374
If it's just about one image, here's my Perl quick'n'dirty solution:

Quote:
#!/usr/bin/perl -w
use strict;
use warnings;
use CGI;
use FindBin '$Bin';

# Config ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~

# chmod this file to 0666
our $LOG = $Bin . 'iplog.txt';
our $IMAGE_URL = 'http blabla com/image.jpg';

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~

my $query = new CGI;

# Create log entry
open(my $fh, '>>', $LOG) or die "Cannot open $LOG for writing: $!";
print $fh $query->remote_host(), "\n";
close($fh) or die "Cannot close $LOG after writing: $!";

# Print redirection header
print $query->redirect($IMAGE_URL);
Save that file as /cgi-bin/my_image.pl, chmod it 755 and use mod_rewrite, e.g.
Quote:
RewriteEngine on
RewriteRule /some_dir/image.jpg /cgi-bin/my_image.pl
In your HTML file, simply use
Quote:
<img src="/some_dir/image.jpg" alt="Some slut" title="" />

Last edited by donborno; 05-02-2007 at 03:14 PM..
donborno is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 03:14 PM   #12
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,091
Quote:
Originally Posted by DrCocker View Post
I am renting space through a friend who is hosting. He rents from some place in NL I believe, but I don't know the name offhand.

There is an old version of Webalizer on there that I have access to by default, (but it doesn't show me IP addresses accessing specific files such as an image, just the referring URL) but if I could find a good one, I could install it myself. On my server I am allowed to use php/javascript/etc., but no ASP/ASP.NET etc.

I'd really appreciate if you could point out a specific analyzer or simple little script that would do this. For some reason it doesn't seem very difficult at all, but it is eluding me.
On your server:

Create a folder inside the domain space you will host the image on.
Set the security on the folder to 777 (writable)
inside the folder create an .htaccess file to redirect any image calls to a script name.
in the same folder create a script that writes a time stamp and the incoming ip to a text file and then serves up the image.

htaccess:

AuthUserFile /dev/null
AuthGroupFile /dev/null

RewriteEngine On
ReWriteRule .*\.(jpg|gif)$ http://www.your_domain_name.com/fold...scrip_name.php [R,L]

in the script:

<?php
$fp=fopen('testit.txt','a');
if ($fp>0)
{
fwrite($fp, date("F j, Y, g:i a") . " " . $_SERVER['REMOTE_ADDR'] . "\n");
fclose($fp);
}
header("Location: http://www.your_domain_name.com/image_to_return.jpg");
?>

This will log each hit and show you the datetime and ip of the hit.

Make sure not to put the image you are returning in the same folder as the script and htaccess, because you are redirecting all image hits you will end up going around and around and around.

Anytime you want to reset it, just delete the file you are writing to and it will recreate itself on the next hit.

When you want to look at the ips, just go to the file.

Test of concept:

http://www.sigamatic.com/testarea/anyoldimagewilldo.jpg

file being created http://www.sigamatic.com/testarea/testit.txt


Hope this helps, sorry I took so long to get back, sort of forgot about it till you bumped it
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 03:16 PM   #13
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,091
Quote:
Originally Posted by donborno View Post
If it's just about one image, here's my Perl quick'n'dirty solution:



Save that file as /cgi-bin/my_image.pl, chmod it 755 and use mod_rewrite, e.g.


In your HTML file, simply use

You beat me )

Well, now he has a perl and a php version
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 03:28 PM   #14
donborno
Confirmed User
 
Join Date: Jan 2007
Location: Vienna, Austria
Posts: 374
Quote:
Originally Posted by sarettah View Post
You beat me )

Well, now he has a perl and a php version
lol

Funny how few adult webmasters know how to code a simple script like that
donborno is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 04:42 PM   #15
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
That looks awesome guys, thanks a million!

Just out of curiosity, is there a way to make it just a hair more robust by resolving the IP's as well? If not, no big deal, but it would be really nice.
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 05:13 PM   #16
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,091
Quote:
Originally Posted by DrCocker View Post
That looks awesome guys, thanks a million!

Just out of curiosity, is there a way to make it just a hair more robust by resolving the IP's as well? If not, no big deal, but it would be really nice.
You could write the remote host into it too.


fwrite($fp, date("F j, Y, g:i a") . " " . $_SERVER['REMOTE_ADDR'] . " " . $_SERVER['REMOTE_HOST'] . " \n");

Anymore costs ya
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 05:56 PM   #17
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
It's working great.

For some reason, even with that remote host code, it's still only showing the IP address, and leaving the remote host blank.

Another thing I am wondering about, in order to make it work, I needed to place a copy of the image in both the folder where the script is, and in the root of the site (where I edited in the php script), and then call the image form the folder's copy, (calling the one in the root folder doesn't write the txt file) which then redirects to the image at the root. I am wondering if this is an issue seeing that you mentioned in your post not to place the image in the folder with the script? By all outward appearances, it's not creating an infinite loop, it's just writing the visit to the txt file once.

Thank you very much for all of your help. Now I have something to build on. (need to figure out how to filter out my own IP,etc.)
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 06:14 PM   #18
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
Just an update to my last post, I got the resolution part working. I just switched it to:

Code:
$store_ip = $_SERVER['REMOTE_ADDR'];
$store_resolved = gethostbyaddr($store_ip);

fwrite($fp, date("F j, Y, g:i a") . " " . $store_ip . " " . $store_resolved . " \n");
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-02-2007, 07:07 PM   #19
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,091
Quote:
Originally Posted by DrCocker View Post
It's working great.

For some reason, even with that remote host code, it's still only showing the IP address, and leaving the remote host blank.

Another thing I am wondering about, in order to make it work, I needed to place a copy of the image in both the folder where the script is, and in the root of the site (where I edited in the php script), and then call the image form the folder's copy, (calling the one in the root folder doesn't write the txt file) which then redirects to the image at the root. I am wondering if this is an issue seeing that you mentioned in your post not to place the image in the folder with the script? By all outward appearances, it's not creating an infinite loop, it's just writing the visit to the txt file once.

Thank you very much for all of your help. Now I have something to build on. (need to figure out how to filter out my own IP,etc.)

Shouldn't have had to do that with the image. The copy being called by the script is all that should be needed.

But without looking at exactly all you did I couldn't tell you why you are seeing that issue. The way I described it is exactly what I have set up in the test urls I listed above.

Don't know why the remote_host isn't getting anything for you except that every server implementation is different But the get host from ip call should work too.

I have the remote host in the test link above now too, so you can see that it does pull in on my server.

You can do a filter of your ip with a simple if

if($_SERVER['REMOTE_ADDR']<>ip_to_block)
{
all the code you are running now;
}

That will write any ips except whichever you put into the condition.

If you want to get fancy with this then you ought to create a table in mysql and then you can keep track of number of hits by ip, and serve up different images based on conditions such as referral string etc. It could be done in text too, but easier to write against a simple table.

Have fun
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-04-2007, 11:55 AM   #20
DrCocker
Registered User
 
Join Date: Oct 2003
Posts: 14
Thanks again.

I'm working on figuring out how to make an array to store as many IP's to filter out as needed (dynamic), and I guess I'll do a loop through them, only processing the ip's that aren't in the array.

The mysql idea sounds awesome too.

Re: the weird handling of the actual .gif, I wonder if it has something to do with the .htaccess I already have at the root of the website? I know these work recursively, and I don't see anything in there that should cause it, but maybe your eyes can spot something that I'm missing? (note: the blocked IP's are from some guy that I had a spam problem with in the past.)

Code:
<limit GET PUT POST>
order allow,deny
deny from 24.155.84.7
deny from 59.77.0.167
deny from 61.11.99.110
deny from 62.1.204.210
deny from 64.60.142.202
deny from 64.246.18.25
deny from 65.170.66.134
deny from 66.36.243.77
deny from 66.109.17.12
deny from 68.116.39.3
deny from 81.169.169.4
deny from 81.208.95.27
deny from 81.222.178.26
deny from 82.103.131.31
deny from 84.204.166.183
deny from 85.91.236.141
deny from 86.57.154.5
deny from 86.57.155.193
deny from 86.57.156.232
deny from 86.57.157.190
deny from 87.118.98.133
deny from 87.118.103.185
deny from 87.118.104.44
deny from 87.118.104.239
deny from 129.41.250.20
deny from 134.83.1.225
deny from 138.26.144.52
deny from 200.107.51.192
deny from 202.101.6.85
deny from 202.213.200.228
deny from 203.113.13.3
deny from 204.169.116.1
deny from 207.234.146.114
deny from 207.234.225.206
deny from 210.210.12.141
deny from 211.5.216.27
deny from 212.227.93.20
deny from 213.140.56.4
deny from 216.32.65.74
deny from 218.154.47.134
deny from 221.13.66.161
deny from 221.149.59.98
allow from all
</limit>

# deny most common except .php
<filesmatch "\.(inc|tpl|h|ihtml|sql|ini|conf|class|bin|spd|theme|module)$">
deny from all
</filesmatch>

#Disable .htaccess viewing from browser
<files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</files>

<files ~ "\config.php$">
deny from all
</files>

# You can change to yoursite.com
ErrorDocument 403 /error.php?403
ErrorDocument 404 /error.php?404

Options -Indexes
DrCocker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-04-2007, 06:59 PM   #21
vod
Confirmed User
 
vod's Avatar
 
Join Date: Jan 2006
Posts: 3,510
goodluck
__________________


Adult Merchant Account
vod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
Old 05-05-2007, 01:47 AM   #22
yahoo-xxx-girls.com
Confirmed User
 
yahoo-xxx-girls.com's Avatar
 
Join Date: Jul 2006
Location: Canada
Posts: 3,143
Simple fix... ^^

This might sound retarded, however I going to say it...

Use a javascript or php counter to keep track of a web page views... Rather then trying to get every IP address from picture tracking...

Even if you are able to get every IP address for every image; you are no better off... How are you going to deal with dynamic connections and their page loads ?

Perhaps software firewalls, routers, dynamic connections, misc scripts and badly setup server, might be a little too much for you... It's why I'm pointing out the very easy fix...

Good luck,
yahoo-xxx-girls.com is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook
 
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.