Announcement

Collapse
No announcement yet.

Inspired

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Inspired

    As title suggests i was actually inspired by this post SSL and PHP to find a solution to a problem i have been having with displaying rss feeds as javascript i went to a few sites that generated the javascript code and they did work after a fashion if it was a non ssl site yes fine but when it came to ssl sites not a chance.
    So i needed to find a way to do this end result created a subdomain ie:
    Code:
    https://feeds.subdomain.com
    And created the javascript from there and bingo result in piccys
    Click image for larger version  Name:	vbm.png Views:	2 Size:	497.0 KB ID:	2891
    So thanks for the inspiration
    Also for a couple of mods i installed on my site.
    Regards
    Willie
    Attached Files
    Last edited by glennrocksvb; 03-05-2017, 01:59 PM. Reason: Fixed link to post
    Wise men say nothing Fools never listen

    #2
    Glad that my post inspired you. And you did a good job figuring out how to make it work.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      I have acually made it a live feed page on my site which is so much easier to do now than it was back in vb3.x.x days i have put a couple of feeds from here as a demo.
      If you want to have a look it is https://cometbar.co.uk/feeds
      I will using it mostly for security threats like virus/malware stuff like that.
      Regards
      Willie
      Wise men say nothing Fools never listen

      Comment


        #4
        The different feeds are cool!

        This gives me an idea to create a custom Feed Module without using Javascript.
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


          #5
          There are several sites out there that can convert the feed to php,html,wordpress,etc but none i treid supported ssl or if they did you had to subscribe £££ per month to use it the one i am using is actually on my own website and supports ssl so i can create as many live feeds as i like.
          I was even considering offering it as a free service to people but not sure if anyone would be interested.
          Wise men say nothing Fools never listen

          Comment


            #6
            But if the feed is fetched by and generated from your server using PHP and cURL, then it shouldn't matter if the feed supports SSL or not.
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


              #7
              The problem was.
              Code:
              <script language="JavaScript" src="http://feed.cometbar.co.uk//feed2js.php?src=https%3A%2F%2Fvbmods.rocks%2Fexternal%3Ftype%3Drss2%26nodeid%3D164&chan=y&num=5&utf=y"  charset="UTF-8" type="text/javascript"></script>
              
              <noscript>
              <a href="http://feeds.cometbar.co.uk//feed2js.php?src=https%3A%2F%2Fvbmods.rocks%2Fexternal%3Ftype%3Drss2%26nodeid%3D164&chan=y&num=5&utf=y&html=y">View RSS feed</a>
              </noscript>
              if you look at the http:// this should be https:// so the above code did not display because the ssl cert disabled it with the error mixed content yet the


              Code:
              <script language="JavaScript" src="https://feed.cometbar.co.uk//feed2js.php?src=https%3A%2F%2Fvbmods.rocks%2Fexternal%3Ftype%3Drss2%26nodeid%3D164&chan=y&num=5&utf=y"  charset="UTF-8" type="text/javascript"></script>
              
              <noscript>
              <a href="https://feeds.cometbar.co.uk//feed2js.php?src=https%3A%2F%2Fvbmods.rocks%2Fexternal%3Ftype%3Drss2%26nodeid%3D164&chan=y&num=5&utf=y&html=y">View RSS feed</a>
              </noscript>
              Worked just fine as seen in pic
              Click image for larger version

Name:	vbmods.png
Views:	97
Size:	189.3 KB
ID:	2994





              Wise men say nothing Fools never listen

              Comment


                #8
                That's as expected because you were including the feed URL on the page as a separate http request. But if you implemented it as a PHP Module and call the external feed URL from the PHP code, then it wouldn't matter if https is used or not. Since you already have the PHP code to fetch the feeds, then I recommend you to paste the code in a PHP module (remember, without PHP tags <?php and ?>) and instead of outputting Javascript code such as document.write, you simple echo the result. This solution is also SEO-friendly since the feed result is in the original HTML output source as compared to using Javascript generated feed which search engines may not see.
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment

                Users Viewing This Page

                Collapse

                There is 1 user viewing this forum topic.

                • Guest Guest

                Latest Posts

                Collapse

                Working...
                X
                Searching...Please wait.
                An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                Please push the back button and reload the previous window.'
                An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                Please push the back button and reload the previous window.'
                An internal error has occurred and the module cannot be displayed.
                There are no results that meet this criteria.
                Search Result for "|||"