icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » Is there a way to pull .php files from another server?

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old February 7th, 2010, 9:13 PM   #10 (permalink)
Twist3d One
Super #1
 
Twist3d's Avatar
 
Joined in Dec 2007
Lives in IA
Hosted on pass81 & sh110
1,887 posts
Gave thanks: 44
Thanked 62 times
Send a message via ICQ to Twist3d Send a message via AIM to Twist3d Send a message via MSN to Twist3d Send a message via Yahoo to Twist3d Send a message via Skype™ to Twist3d
I'm looking but I know nothing about curl at all.

Hopefully I find something about it soon.
__________________
Pass 81 SH 110
Twist3d is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 7th, 2010, 11:35 PM   #11 (permalink)
Twist3d One
Super #1
 
Twist3d's Avatar
 
Joined in Dec 2007
Lives in IA
Hosted on pass81 & sh110
1,887 posts
Gave thanks: 44
Thanked 62 times
Send a message via ICQ to Twist3d Send a message via AIM to Twist3d Send a message via MSN to Twist3d Send a message via Yahoo to Twist3d Send a message via Skype™ to Twist3d
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 81 SH 110
Twist3d is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 7th, 2010, 11:55 PM   #12 (permalink)
Twist3d One
Super #1
 
Twist3d's Avatar
 
Joined in Dec 2007
Lives in IA
Hosted on pass81 & sh110
1,887 posts
Gave thanks: 44
Thanked 62 times
Send a message via ICQ to Twist3d Send a message via AIM to Twist3d Send a message via MSN to Twist3d Send a message via Yahoo to Twist3d Send a message via Skype™ to Twist3d
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 81 SH 110
Twist3d is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 8th, 2010, 12:27 AM   #13 (permalink)
Surpass Fan
Super #1
 
fury's Avatar
 
Joined in Dec 2005
Lives in MN > USA
Hosted on pass84
2,140 posts
Gave thanks: 89
Thanked 112 times
Send a message via AIM to fury Send a message via Skype™ to fury
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
fury is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 8th, 2010, 8:29 AM   #14 (permalink)
Rolling with the punches
Comfy Contributor
 
Giles's Avatar
 
Joined in Oct 2008
Lives in 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.
Hosted on CocaCola and Pop Rocks.
256 posts
Gave thanks: 32
Thanked 15 times
Send a message via AIM to Giles
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
Giles is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 8th, 2010, 9:19 AM   #15 (permalink)
Twist3d One
Super #1
 
Twist3d's Avatar
 
Joined in Dec 2007
Lives in IA
Hosted on pass81 & sh110
1,887 posts
Gave thanks: 44
Thanked 62 times
Send a message via ICQ to Twist3d Send a message via AIM to Twist3d Send a message via MSN to Twist3d Send a message via Yahoo to Twist3d Send a message via Skype™ to Twist3d
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 81 SH 110
Twist3d is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 8th, 2010, 9:35 AM   #16 (permalink)
Twist3d One
Super #1
 
Twist3d's Avatar
 
Joined in Dec 2007
Lives in IA
Hosted on pass81 & sh110
1,887 posts
Gave thanks: 44
Thanked 62 times
Send a message via ICQ to Twist3d Send a message via AIM to Twist3d Send a message via MSN to Twist3d Send a message via Yahoo to Twist3d Send a message via Skype™ to Twist3d
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 81 SH 110
Twist3d is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 9th, 2010, 5:07 PM   #17 (permalink)
Race Surpass
Super #1
 
MarkRH's Avatar
 
Joined in Jul 2006
Lives in Oklahoma City, OK
Hosted on sh102
1,510 posts
Gave thanks: 21
Thanked 104 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,
__________________
SH102 : Mark Headrick - Blog - Gallery
Pelicar | Company of Valor | Mysstie
MarkRH is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On