Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Identifying IP address location

  1. #11
    Senior Member
    Join Date
    Nov 2016
    Location
    Michigan USA
    Posts
    104

    Default

    Quote Originally Posted by gprit View Post
    Maybe I am a bit dim here.....but I don't see this achieves what I want to do........
    You aren't alone. I don't see it either. I am not a PHP programmer but I configure PHP modules (isapi.dll or fastcgi) all the time. When the server reads the web page, it intercepts any program code by looking for stuff like ?>/P in the page and runs it. PHP modules are really mini programming languages that run the code in a web page.

    What is not explained here is what does the program code do with the data it collects, where does it put it, and what is someone writing a NOF site supposed to do with it. I don't see anything in the comment lines explaining any of this.

  2. #12
    Banned
    Join Date
    Dec 2010
    Location
    France...ex UK
    Posts
    596

    Default

    ok, can set .php extension and PHP (all versions) are installed on serve....so my next questions was going to be.......where do I put the PHP coding and how does it get invoked?? thanks all.

  3. #13
    Senior Member Beach Ape's Avatar
    Join Date
    Apr 2010
    Posts
    378

    Default

    Quote Originally Posted by gprit View Post
    where do I put the PHP coding
    You can put the .php code anywhere you like, same as any other code, before or after the /head tag, inside the body, etc. It depends on where your script writers recommend it to be put.

    Example places in NOF where you can put the code: Just click on the "HTML" button in the properties palette of a master border, image, text box, etc.. or in Page View, at the bottom of the page click the code tab and copy/paste here in the place you want.

    Quote Originally Posted by gprit View Post
    and how does it get invoked??
    Given what was already said, the page extension being php and php installed on your server, it gets invoked immediately upon page load, just like html or any other script. Again at this point, if the code is not 'invoking' something, it has to do with how you're using it and requires support from users or writers of that code. (You may want to output the page to have these folks look at it for suggestions.)

    PS. Understanding your trying to invoke a script that detects an IP's geolocation, you may want to also install on your computer a VPN (Virtual Private Network) to mask your IP as if you're from another country to test the script detection.
    Last edited by Beach Ape; 04-29-2017 at 05:37 PM.

  4. #14
    Senior Member franko's Avatar
    Join Date
    Apr 2010
    Location
    Tasmania Australia
    Posts
    2,617

    Default

    Before starting any programming project it's best to plan out the algorithm in pseudo code (the algorithm in plain English). A pseudo code algorithm for what you want to achieve might look like this (and I've probably missed a few steps because it's Sunday morning before I go to church, but it's to illustrate the point):

    get cookie
    if cookie(read cookie)
    echo cookie //writes cookie to screen
    lookup table(currency)
    echo currency //display currency

    else
    if no cookie
    get IP address
    write cookie(IP address) //writes the cookie to the browser
    lookup table(currency)
    echo currency

    As I said, this is pretty rudimentary and your algorithm may need many more steps but a good way to proceed is to lay out the essential steps and then break the algorithm down in the steps required to complete each action. This will help you analyse and define precisely what, in programming terms, you need to cover off. Once your pseudo code is written and you're happy with it, it's much easier to then convert the pseudo code to the programming language you're using. in your case it will make it easier to identify if a script you've found on the web does the things you need to do or whether it needs modifying.

  5. #15
    Banned
    Join Date
    Dec 2010
    Location
    France...ex UK
    Posts
    596

    Default

    Thanks to all......can see many pointers now to resolve this - will be interesting.
    As a one-time CICS macro level assembler programmer I still like to find out new ways to do things!

  6. #16
    Senior Member franko's Avatar
    Join Date
    Apr 2010
    Location
    Tasmania Australia
    Posts
    2,617

    Default

    Gosh, Assembler. I once (1988-ish) tried to learn Assembler but gave up. But if that's the case, writing algorithms should be child's play to you.

  7. #17
    Junior Member
    Join Date
    Sep 2019
    Location
    Russia
    Posts
    1

    Default 70 лучших ресурсов с бесплатными фотографиями

    Для поиска подходящего изображения с его дальнейшим размещением на определенной площадке не потребуется много времени. В Интернете обычный пользователь может найти тысячу мест, где он сможет скачать необходимый снимок, векторное изображение или иконку.
    Актуальным остается вопрос: Можно ли скачанные фотографии размещать в своих публикациях без нарушения авторских прав? Вам необходим снимок высокого качества, и вы не хотите тратить на него свои деньги.
    *ады сообщить Вам хорошую новость – можно найти потрясающие бесплатные фотостоки, которые позволяют скачивать и размещать высококачественные изображения без рисков нарушения авторских прав и приобретения лицензии.
    Вот первый из них: https://hot-vagina.ru
    Порно фото бесплатно смотреть - <a href="https://hot-vagina.ru">hot-vagina.ru</a>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •