+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 10 to 17 of 17
  1. #10
    Tech N3rd Super #1 Twist3d's Avatar
    Member since
    Dec 2007
    Location
    IA
    posts
    1,949
    Gave thanks
    44
    Thanked 66 times
    I'm looking but I know nothing about curl at all.

    Hopefully I find something about it soon.
    Pass 70

  2. #11
    Tech N3rd Super #1 Twist3d's Avatar
    Member since
    Dec 2007
    Location
    IA
    posts
    1,949
    Gave thanks
    44
    Thanked 66 times
    Well php file function is out of the question due to the feature disabled on the server.

    Looks like I have to figure out this curl thing but after an hour of searching around I still haven't found anything like what I am looking for.

    All I simply want to do is pull DATA from DOMAIN A into a links page on DOMAIN A and pull the same data to DOMAIN B on another links page.
    Pass 70

  3. #12
    Tech N3rd Super #1 Twist3d's Avatar
    Member since
    Dec 2007
    Location
    IA
    posts
    1,949
    Gave thanks
    44
    Thanked 66 times
    This code kinda does what I want but it gives me a shit ton of errors.

    Any idea why?

    Code:
    <?php
    
     = curl_init("http://kustomchoice.com/links.txt");
     = fopen("http://kustomchoice.com/links.txt", "w");
    
    curl_setopt(, CURLOPT_FILE, );
    curl_setopt(, CURLOPT_HEADER, 0);
    
    curl_exec();
    curl_close();
    fclose();
    ?>
    It doesn't matter how I do those links or urls it gives me errors whichever way.

    http://twist3d.net/test.php is the test page with the errors.
    Pass 70

  4. #13
    Surpass Fan Super #1 fury's Avatar
    Member since
    Dec 2005
    Location
    MN > USA
    posts
    2,225
    Gave thanks
    106
    Thanked 120 times
    Try using the server file path.

    Instead of the URL of the file, try:

    /home/[cpanelusername]/public_html/path/to/file.txt
    fury™ - not helping the situation since 1987
    robmonroe.net | Twitter | Foursquare

  5. #14
    Rolling with the punches Comfy Contributor Giles's Avatar
    Member since
    Oct 2008
    Location
    a constant state of confusion thanks to all of this buffonery caused by Twitter and other social networking sites that bring us further and further apart from each other by giving us a chair to sit in instead of exploring the real world with friends.
    posts
    297
    Gave thanks
    38
    Thanked 20 times
    Quote Originally Posted by Twist3d View Post
    = fopen("http://kustomchoice.com/links.txt", "w");
    That is allow_url_fopen that is disabled globally. You can enable this locally with a php.ini

    We can assist in getting allow_url_fopen enabled in a support ticket if needed.
    + =

    4 8 15 16 23 42

  6. #15
    Tech N3rd Super #1 Twist3d's Avatar
    Member since
    Dec 2007
    Location
    IA
    posts
    1,949
    Gave thanks
    44
    Thanked 66 times
    Quote Originally Posted by fury View Post
    Try using the server file path.

    Instead of the URL of the file, try:

    /home/[cpanelusername]/public_html/path/to/file.txt
    Tried it. Same error. Looks like I need to get allow_url_fopen enabled

    Quote Originally Posted by Giles View Post
    That is allow_url_fopen that is disabled globally. You can enable this locally with a php.ini

    We can assist in getting allow_url_fopen enabled in a support ticket if needed.
    I'll see if I can find something about that on google before I bother you guys. Thanks!
    Pass 70

  7. #16
    Tech N3rd Super #1 Twist3d's Avatar
    Member since
    Dec 2007
    Location
    IA
    posts
    1,949
    Gave thanks
    44
    Thanked 66 times
    Tried adding this to a php.ini file but now it simply displays a blank page. LOL

    so that has to be wrong. still scouting...

    Code:
    <?php phpinfo(); ?>
    allow_url_fopen=off
    Pass 70

  8. #17
    Race Surpass Super #1 MarkRH's Avatar
    Member since
    Jul 2006
    Location
    Oklahoma City, OK
    posts
    1,555
    Gave thanks
    23
    Thanked 108 times
    This is how I use Curl to pull information from another domain:

    Well, I did have code here but the forum keeps stripping out all the variable names when I use either "code" or "php" BBC tags. The first code block in this post is basically what I was trying to put here: http://blog.markheadrick.com/2009/11...rmance-issues/

    Replace the URL accordingly.

    Hope it helps,

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may edit your posts