Table of Contents

How to create membership using JSON Scraping and PHP Native Generator?

  1. Create a new project
  2. Make several pages and link to the menu, for example here I make the page name and menu : premium
  3. Go to (IMAB) Back-End ConfigurationBack-End Configuration, then create the table, for example I give a name premium
  4. When finished go to: (IMAB) Back-End ConfigurationPHP Native Generator, For the Enable Users & JWT Auth option please checked
  5. Now we need JWT Addons to create login and register menus, go to (IMAB) Add-onsJWT Auth, for JWT Auth Type select PHP Native Generator and enter the Main URL (The URL of the hosting that is used for rest-api later)

    for After Login Goto Page select Premium Page

    and Premium Page rule select user

  6. Then upload backend to your hosting, go to: (IMAB) Back-End ConfigurationPHP Native Generator, Then download the Zip file and install to your hosting.

    Most of the shared hosting has disabled the HTTP Authorization Header by default. To enable this option you'll need to edit your .htaccess file adding the follow:

    <IfModule mod_rewrite.c>
    # Add this code
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
    </IfModule>
    
    # And this code
    SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
    
    

    And your web must use SSL (https://), so it can't be tried on localhost.

  7. Please try running the emulator, if you have successfully logged in correctly. you can go to the next step
  8. Go to the (IMAB) Add-OnsJSON Scraping addons menu and do the settings as usual and test, If retrieving data is successful you can change the option Authentication Type to JSON Web Token (JWT Auth)

  9. Then go to (IMAB) Back-End ConfigurationBack-End Configuration again, and checked Required Authorization option

  10. Then go to (IMAB) Back-End ConfigurationPHP Native Generator again, then create file or upload rest-api code to your server again

Last edit: 2021-05-30 03:03:44

Comment

For any question about products, please contact email support is: info@ihsana.com and info@ihsana.net

Search

img