Support » Fixing WordPress » What does this function do? (curl_init)

  • Resolved asharperrazor


    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.

     $url = "";
     $ch = curl_init();
     $timeout = 5;
     $data = curl_exec($ch);
     echo "$data";

    What exactly does it do?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator keesiemeijer



    It tries to get content from “”.

    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.



    Well, it appears that 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?

    Moderator keesiemeijer



    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.

    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:

    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:

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

    here another blogger spotted this problem…

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

    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.

    Moderator keesiemeijer



    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.

    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

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

    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 :

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘What does this function do? (curl_init)’ is closed to new replies.