Jump to content


Photo

NASID Varible


  • Please log in to reply
6 replies to this topic

#1 Impius

Impius
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 October 2006 - 03:59 PM

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...
<?php
if (isset($_GET['nasid'])) {
if ($_GET['nasid'] === 'nasid1')
{ $image = "nasid1image"; }
elseif ($_GET['nasid'] === 'nasid2')
{ $image = "nasid2image"; }
print "<img src=\"$image\">"; } 
Thanks in advance,
Impius

#2 thepip3r

thepip3r
  • Members
  • PipPipPip
  • Advanced Member
  • 289 posts

Posted 05 October 2006 - 04:01 PM

um... wtf is a "nasid" and where is this mysterious code you speak of that's not working?

#3 Impius

Impius
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 October 2006 - 04:04 PM

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.

#4 thepip3r

thepip3r
  • Members
  • PipPipPip
  • Advanced Member
  • 289 posts

Posted 05 October 2006 - 04:05 PM

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.

#5 Impius

Impius
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 October 2006 - 04:08 PM

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.

#6 thepip3r

thepip3r
  • Members
  • PipPipPip
  • Advanced Member
  • 289 posts

Posted 05 October 2006 - 04:12 PM

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 COM.  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.

#7 Impius

Impius
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 October 2006 - 05:10 PM

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?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users