load script on http and not https

This is a discussion on "load script on http and not https" within the PHP Forum section. This forum, and the thread "load script on http and not https are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 16th, 2006, 14:41
New Member
Join Date: Jun 2005
Location: Oldham, UK
Age: 38
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
load script on http and not https

I have adsense on my store template, the problem comes whe someone wants to log in to their account. The login page is https which displays the unsecure items warning. this is caused by adsense code. what I want to do is have some code that will check if the page is http or https and only display the code if its http, as i think getting a warning scares some web users..

Any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 16th, 2006, 17:44
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: load script on http and not https

To get rid of the warning put the images inside the secure folder.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Mar 20th, 2006, 09:33
New Member
Join Date: Jun 2005
Location: Oldham, UK
Age: 38
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: load script on http and not https

Quote:
Originally Posted by sypher
To get rid of the warning put the images inside the secure folder.
The adsense dosn't use images, its just text ads
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Mar 20th, 2006, 10:12
craig's Avatar
Reputable Member
Join Date: Sep 2005
Location: Preston, UK
Age: 21
Posts: 382
Thanks: 0
Thanked 0 Times in 0 Posts
Re: load script on http and not https

Is it oscommerce???
If so this may be useful...
http://www.oscommerce.com/community/...ns,3206/page,3

Craig
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Mar 22nd, 2006, 15:46
New Member
Join Date: Jun 2005
Location: Oldham, UK
Age: 38
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: load script on http and not https

Cheers for that craig,,

All I had to do was cut the adsense code and save it as google.js and put it in my includes/boxes folder

the add the following to my page where the adsense code was.

Code: Select all
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" align="center">
  <TR>
    <TD><center><?php 
  if ($request_type == NONSSL) {   /* only show adsense in NON SSL else it causes warning */
     include(DIR_WS_BOXES . 'google.js');
     }
     ?>
</center>
    </TD>
    </TR>
    </TABLE>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
load, script, http, https

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IE5x & https, time-outs loading site... c_martini Web Page Design 11 Nov 7th, 2006 08:41
http://www.sabukudo.com Grobulous Free Web Site Critique 8 Oct 4th, 2006 12:11
login client automatically to https website minnie ASP.NET Forum 1 Jul 30th, 2006 18:15
Session variables lost when http goes to https. Add to link? Andy K Classic ASP 3 Jul 19th, 2005 15:20


All times are GMT. The time now is 16:30.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42