Jump to content

Archived

This topic is now archived and is closed to further replies.

Impius

NASID Varible

Recommended Posts

Ok, I've been beating my head against a wall trying to figure this coding out, what I'm trying to do is to use the nasid of the device accessing the page to display different images dependent upon the nasid that access the page, so far I've either gotten a syntax error or I've gotten a blank spot on the page where the image should be displayed. this is what I have so far...
[code]
<?php
if (isset($_GET['nasid'])) {
if ($_GET['nasid'] === 'nasid1')
{ $image = "nasid1image"; }
elseif ($_GET['nasid'] === 'nasid2')
{ $image = "nasid2image"; }
print "<img src=\"$image\">"; }
[/code]
Thanks in advance,
Impius

Share this post


Link to post
Share on other sites
um... wtf is a "nasid" and where is this mysterious code you speak of that's not working?

Share this post


Link to post
Share on other sites
the NASID is basically a virtual serial code for any piece of hardware, motherboard, video card, sound car, ect in this case I'm concerned with the nasid of the router/modem that is accessing the page, I have the nasids of the hardware that I am working with so having those on hand isn't the issue.

Share this post


Link to post
Share on other sites
yes but do you have some back-end function that's pulling this information from the hardware of the connected device?  I don't know but I'm pretty sure PHP can't do this natively.

Share this post


Link to post
Share on other sites
no I've been trying to do this purely through PHP, not sure if there is a function to actually do what I want or not I've been trying to use what I know of PHP (which mind you is limited) to do this.

Share this post


Link to post
Share on other sites
I'm pretty sure unless it's a windows box that your IIS user account has rights to (which is highly unlikely anyways), you could try to play around with [url=http://www.php.net/manual/en/ref.com.php]COM[/url].  But other than that, I'm pretty sure you'd need some custom executable that would perform some sort of RARP command to get the info it seems you're looking for.

Share this post


Link to post
Share on other sites
so if I'm understanding you correctly though purely PHP there's no way to pull the nasid and then us it to dertermine a varible?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.