Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Getting fsocketopen() Error in cPanel API
Old 11-28-2008, 05:15 PM Getting fsocketopen() Error in cPanel API
Skilled Talker

Posts: 64
Name: Ralph Freshour
Trades: 0
I'm trying to use cPanel API to grab my disk space usage and I'm getting the following error - I'm using cPanel API.

Warning: fsockopen() [function.fsockopen]: unable to connect to mywebsite.com:2082 (Connection timed out) in /home/mywebsite/public_html/cPanel.php on line 53
Disk Space Used: 0 MB

This is my small test code (my real login parameters removed):

PHP Code:
include "cPanel.php"
$cPanel = new cPanel('mywebsite.com''username''password'2082false); 
echo 
'Disk Space Used: ' $cPanel->getSpaceUsed() . ' MB<br>'
__________________
RalphF
Business Text Messaging Services

Please login or register to view this content. Registration is FREE
rfresh is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-30-2008, 11:53 AM Re: Getting fsocketopen() Error in cPanel API
Skilled Talker

Posts: 64
Name: Ralph Freshour
Trades: 0
The problem was my hosting providers firewall. They suggested I use "localhost" instead of the domain name. So I did that and it fixed that fsockopen() error.

PHP Code:
include "cPanel.php";  
$cPanel = new cPanel('localhost''username''password'2082false);  
echo 
'Disk Space Used: ' $cPanel->getSpaceUsed() . ' MB<br>'
Now however, the Disk Space Used is 0MB and that isn't right. Username and Userpassword should connect to the target cPanel account and fetch the disk space used. Does anyone have any idea's on this issue?
__________________
RalphF
Business Text Messaging Services

Please login or register to view this content. Registration is FREE
rfresh is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Getting fsocketopen() Error in cPanel API
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15720 seconds with 12 queries