You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been enjoying using this plugin but got frustrated with all the copy/paste to a whois tool when trying to get more info on who has clicked my links so I thought I'd try to add a hyperlink to the table listing IP addresses despite the fact that I don't really know how to code. After much trial and error (not to mention googling) I'm very excited that it works!
I think that others would find this useful and I'd like to share it besides making my first ever contribution to a GitHub project. Details are below but is there a better way to include this new functionality to the master?
What I did:
I added another column/header item to the end of the display table code so <table> <tr> <th>IP</th> <th>Shorturl</th> <th>Referrer</th> <th>User Agent</th> <th>IP Address</th> <th>Country</th> <th>Date & Time</th> </tr> ";
became table> <tr> <th>IP</th> <th>Shorturl</th> <th>Referrer</th> <th>User Agent</th> <th>IP Address</th> <th>Country</th> <th>Date & Time</th> <th>WhoIs</th> </tr> ";
That was the easy part.
Then, after lots of trying I got the next part to work. At the bottom of the table code, after echo "<td><input value='".$row['click_time']."' readonly/></td>";
but before echo "</tr>"; } echo " </table>
I added echo "<td><a href=https://who.is/whois-ip/ip-address/{$row['ip_address']} target=_blank>" . $row['ip_address']."</a></td>";
I tried a few different whois tools, specifically https://iplocation.io/ip-whois-lookup and https://whois.domaintools.com/, but I found that https://who.is/ seems to work best without captchas, limits, etc. though it does take a bit long for each page to load. You can easily use the IP lookup tool of your choice, as long as it's accessed by concatenating the IP address in question within the URL by simply replacing https://who.is/whois-ip/ip-address/ with the URL (minus the IP address slug, that's handled automatically by the {$row['ip_address']} piece) of the lookup tool you prefer.
Did I do good? Is this something that makes sense to include in the main code? If so, how to do so?
I suppose there is one issue that remains, the width of the added column for WhoIs makes the User Agent column data a bit too small. I'm not sure how to fix that but I suppose one option would be to remove the IP Address column now that this data is repeated in the new column but that seems less than ideal to me.
Thanks in advance for your input!
The text was updated successfully, but these errors were encountered:
I've been enjoying using this plugin but got frustrated with all the copy/paste to a whois tool when trying to get more info on who has clicked my links so I thought I'd try to add a hyperlink to the table listing IP addresses despite the fact that I don't really know how to code. After much trial and error (not to mention googling) I'm very excited that it works!
I think that others would find this useful and I'd like to share it besides making my first ever contribution to a GitHub project. Details are below but is there a better way to include this new functionality to the master?
What I did:
I added another column/header item to the end of the display table code so
<table> <tr> <th>IP</th> <th>Shorturl</th> <th>Referrer</th> <th>User Agent</th> <th>IP Address</th> <th>Country</th> <th>Date & Time</th> </tr> ";
became
table> <tr> <th>IP</th> <th>Shorturl</th> <th>Referrer</th> <th>User Agent</th> <th>IP Address</th> <th>Country</th> <th>Date & Time</th> <th>WhoIs</th> </tr> ";
That was the easy part.
Then, after lots of trying I got the next part to work. At the bottom of the table code, after
echo "<td><input value='".$row['click_time']."' readonly/></td>";
but before
echo "</tr>"; } echo " </table>
I added
echo "<td><a href=https://who.is/whois-ip/ip-address/{$row['ip_address']} target=_blank>" . $row['ip_address']."</a></td>";
I tried a few different whois tools, specifically https://iplocation.io/ip-whois-lookup and https://whois.domaintools.com/, but I found that https://who.is/ seems to work best without captchas, limits, etc. though it does take a bit long for each page to load. You can easily use the IP lookup tool of your choice, as long as it's accessed by concatenating the IP address in question within the URL by simply replacing
https://who.is/whois-ip/ip-address/
with the URL (minus the IP address slug, that's handled automatically by the{$row['ip_address']}
piece) of the lookup tool you prefer.Did I do good? Is this something that makes sense to include in the main code? If so, how to do so?
I suppose there is one issue that remains, the width of the added column for WhoIs makes the User Agent column data a bit too small. I'm not sure how to fix that but I suppose one option would be to remove the IP Address column now that this data is repeated in the new column but that seems less than ideal to me.
Thanks in advance for your input!
The text was updated successfully, but these errors were encountered: