![]() |
![]() |
![]() |
||||
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. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
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! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
Writer
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 |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
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. ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
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! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#5 |
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.
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#6 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,091
|
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! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#7 |
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! |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#8 |
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. ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#9 |
Registered User
Join Date: Oct 2003
Posts: 14
|
* bump *
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#10 |
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. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#11 | |||
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:
Quote:
Quote:
|
|||
![]() |
![]() ![]() ![]() ![]() |
![]() |
#12 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,091
|
Quote:
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! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#13 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,091
|
Quote:
You beat me ![]() Well, now he has a perl and a php version ![]()
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Join Date: Jan 2007
Location: Vienna, Austria
Posts: 374
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#15 |
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. |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#16 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,091
|
Quote:
fwrite($fp, date("F j, Y, g:i a") . " " . $_SERVER['REMOTE_ADDR'] . " " . $_SERVER['REMOTE_HOST'] . " \n"); Anymore costs ya ![]()
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#17 |
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.) ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#18 |
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"); |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#19 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,091
|
Quote:
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 ![]() 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! |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#20 |
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 |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#21 |
Confirmed User
Join Date: Jan 2006
Posts: 3,510
|
goodluck
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#22 |
Confirmed User
Join Date: Jul 2006
Location: Canada
Posts: 3,143
|
![]() 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, |
![]() |
![]() ![]() ![]() ![]() |