| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#11 (permalink) |
|
Twist3d One
Super #1
|
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.
__________________
|
|
|
|
|
|
#12 (permalink) |
|
Twist3d One
Super #1
|
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();
?>
http://twist3d.net/test.php is the test page with the errors.
__________________
|
|
|
|
|
|
#13 (permalink) |
|
Surpass Fan
Super #1
|
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 |
|
|
|
|
|
#14 (permalink) |
|
Rolling with the punches
Comfy Contributor
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.
|
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 |
|
|
|
|
|
#15 (permalink) | |
|
Twist3d One
Super #1
|
Quote:
I'll see if I can find something about that on google before I bother you guys. Thanks!
__________________
|
|
|
|
|
|
|
#17 (permalink) |
|
Race Surpass
Super #1
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, |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|