Results 1 to 2 of 2

Thread: http + https hostdomain

  1. #1
    Join Date
    Apr 2013

    http + https hostdomain


    I have a live chat widget. To have the widget to work in SSL pages, I had to change in all .php from:
    PHP Code:
    if(!strstr($hostdomain,"http")){ $hostdomain="http://".$hostdomain; } 
    PHP Code:
    if(!strstr($hostdomain,"https")){ $hostdomain="https://".$hostdomain; } 
    The problem is when I change the http to https in the code above, now the widget don't appear in non-ssl pages.

    So my question is how can I modify the code below to have it to work with both http and https pages ?

  2. #2
    Join Date
    Apr 2013

    Would an else if statement solve your problem? Like copying non-ssl example you provided in else if condition.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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