Can't Use Curl To Access My Site

Jul 7, 2007

<?
function usecurl1($url)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_URL, $url );
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/1.6");
$output['html'] = curl_exec ( $ch );
$output['opt'] = curl_getinfo ($ch);
curl_close($ch);

return $output;
}
function usecurl($url)
{
$output=usecurl1($url);
return $output['html'];
}

$output=usecurl1("http://en.wikipedia.org/wiki/Special:Random"); //doesn't work
print_r ($output);

echo '<br>';

$output=usecurl1("http://yahoo.com"); //works
print_r ($output);

?>

View 6 Replies


ADVERTISEMENT

How To Access Password Protected File Via Curl

Nov 19, 2007

I've got a file I want to access via cURL that is within a password protected directory.

I've tried sending:

Code:
$headers = array(
"HTTP_AUTH_LOGIN: admin3e",
"HTTP_AUTH_PASSWD: opensesame",
"Content-Type: text/html"
);

curl_setopt($curl, CUROPT_HTTPHEADER, &$headers);
(insecure)

and:

Code:
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, '[user]:[pass]');
but I can't figure out how to get past the login:

Authorization Required

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
Apache/2.0.52 (CentOS) Server at ****** Port 80

View 3 Replies View Related

How To Open Curl-exec In1 Site

Apr 6, 2009

i need open curl-exec in one site in server

Configured Value for php

PHP 5 Handler dso

View 0 Replies View Related

Cpanel Opening Custom Ports For Outgoing Access For PHP Fsockopen And Curl

Nov 3, 2009

How do you open custom ports for fetching content from a url via a non-standard port, ex [url]:32626 ... (url has 32626 opoen)

View 2 Replies View Related

Cannot Access Site

Oct 14, 2009

I hosted my site in a host "bluehost.com" . They are many domains hosted there. I put my site on a folder "example".

But I am not able to access that site using domain.com/example, it says that "The server could not find this page".

View 3 Replies View Related

Access Blocked To My Site

Feb 25, 2009

It appears that I may have my access blocked from my home network to my web site. I was attempting to set up a POP email account the other night on the server. Since then, I have not been able to access my domain name through ANY of my browsers.

Also, I cannot log-in via FTP. I also tried from my iPod touch on my wireless network at home, no access.

I was able to access and FTP today at work. I also can access on my blackberry. How is this possible?

View 6 Replies View Related

Access Site Through Ip Addresses

Mar 19, 2008

New to dedicated server and struggling!

We have a dedicated server with 4 sites running. All accessed through their domain names.

Is it possible to also have a site on the server as http://ip address for a 'white label' programme?

View 12 Replies View Related

Can't Access My Web Site, Host Says It's My ISP

Feb 25, 2008

Can't access my web site, my web host says it's my ISP.

My WebHost said "It seems that your ISP cannot resolve the domain".

Can an ISP have any control over the accessibility of individual domains?

That's sounds a little strange to me.

My ISP support is currently closed, but I suspect they'll tell me to contact my web host.

I was able to access it earlier today.

What do you think? Is the ISP theory possible?

View 13 Replies View Related

Can't Access My Site Or My Host

Oct 1, 2008

I woke up this morning to find I wasn't able to access my domain based email or my website. So I figured I would check with my host, (www.hostpc.com), and I was unable to access them, also.

I had someone else from a remote location and PC check and they can access hostpc as well as my website.

My PC is up and running fine otherwise.

View 11 Replies View Related

I Get An Error When I Try To Access My Site

Dec 29, 2007

As the title says I get this error

"Fatal error: Maximum execution time of 30 seconds exceeded in /home/nicsad/domains/updownloading.com/public_html/include/kernel/crontab.php on line 0"

when I try to access my site.

The error accured after I "optimized" (yeah sure) Im killing my self, lol,
the file /etc/httpd/conf/extra/httpd-mpm.conf
and restarted the server, I am on a dedicated server, Linux Centos 5 with DirecAdmin panel.

First it worked, there was no problem at all, then after 5-15 minutes I got the above error?

What is weird is that all other websites I have on the server works fine, it only this one which doesnt work:

updownloading com

And what is more weird is that the temporary index.html file I have uploaded is accessible?

but the normal index.php file which my website use is not.

All worked perfect without problem before but now I get the above error.

Please again help, I promise after this time I wont "optmizing" anything Why cant I just be satisfied and stop mendling with what I dont know.

I recieve around 400-500 visitors a day so I hope you can help me fix this problem.

View 14 Replies View Related

Wth Cirtex Can't Connect Ftp Cant Access Site

May 18, 2008

well its been like 6 hours since i purchase from cirtex.

and i can't access ftp or my site.

is it just me or is anyone else experiencing this?

View 11 Replies View Related

How To Allow Client-only Access To A Production Site

Aug 4, 2008

How I do put a website of a client that is in production and give them access it to view it while preventing search engines from indexing it? I had the production site on a sub domain but search engines would inevitably index it. I could a no-index robot text but if people had the domain, they'd still find it. I want to just put it on my server and the client can login with a PW and view the status.

View 3 Replies View Related

Some Countries Or Areas Can Not Access My Site

Oct 13, 2007

I am using vps

I am receving calls from some countries or areas when they say they can not access my site ( site can not be found)

I called my provider and they say every thing is alright from their site
and from my side too but some areas in other countries like right now I received a call from canada they can not access my site my provider wants me to send Tracert

I can ask my friends to send that but not every user why this happanes and what tools are available to check and see if my site is alright from all areas or counties?

View 11 Replies View Related

How To Get A Copy Of Entire Site Without FTP Access

Jan 19, 2007

to get a copy of their entire site onto our servers.

The problem is that they have no backups, and their current host has denied them access to their account. (It's a long story.)

Rather then try and fight with their old host, I wonder if it's easier to just run some kind of "website copy" program and grab a copy of all pages and images, linked files, etc..

Their current website pages are served using an ASP database application, but the copy they need only has to work. It doesn't need to be dynamic, etc... as long as all the pages are there it's good.

View 4 Replies View Related

Access DirectAdmin Site Without Domain - Possible With CPanel

Mar 7, 2009

I'm new to using directadmin and I've got a problem; I've not yet switched the DNS over to the directadmin server 'cause I want to make sure the sites work first, however I can't find how to view the sites. With cpanel you can go to http://192.168.1.1/~username (where 192.168.1.1 = IP of server and username is username of account).
is this possible with directadmin? I can't find anything about it, anywhere.

View 6 Replies View Related

FTP, SSH, Httpd Status Is Running. But Why Can't Access The Site

Oct 22, 2009

I can access FTP, SSH and httpd is showed as running when i check with 'httpd status'. Memory ram has half of them left(except that swap is 0,0).

I can't access my site via browser

Why tried restarting
[root@web2 ~]# service httpd start
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[root@web2 ~]#

View 11 Replies View Related

Single User Can't Access Any Site On My Server

Feb 16, 2009

I have a user who says he cannot get to any site on my server from either home or work. He has been a user for many years, and has never had any problems. He has also checked with his IT at work and they confirmed the site is not available. He is computer savvy, so I trust he is telling the truth.

His work and home are only 10 miles apart.

Do you guys have any ideas what could be happening? Is there a DNS entry wrong somewhere? He can't access the site even when putting in the IP address.

There is one other user reporting something similar but other than that no other complaints. The site works fine for everyone else.

site is gm-trucks.com

View 4 Replies View Related

Ping Result Is Fine But Can Not Access My Site

May 29, 2008

I can login to my site or it is extremly slow.

[url]

what is happening to my server? it is because of network or something else?

View 5 Replies View Related

Apache :: Access Denied When Accessing New Virtual Host Site

Apr 28, 2015

I created a new virtual site and cloned an existing to to the new docroot to have content. But when I access it I receive the Access Denied you do not have permission to access . . .I've checked all my entries and unless I'm blind I cannot figure out how to remedy this on my Windows 2003R2 server running apache 2.2.x

View 1 Replies View Related

Need CURL Enabled

Apr 9, 2009

I have a Linux-Debian server, I have Apache2, PHP ect setup for a basic website im running on it too, However I need cURL enabled, I cant seem to find any options in the php.ini files to enable cURL at all.

I know that you just uncomment it to enable it however I dont see it at all, even it being disabled. I opened it in notepad and used the SEARCH feature and it couldnt find it eithier.

View 5 Replies View Related

CURL Library

Jan 9, 2009

Do you know what cURL Library means?

I have seen that in apthost.com reseller plan.

View 0 Replies View Related

Install CURL

Oct 14, 2009

I got some one to help me install cURL. Now all I have to do is change the permissions for the /usr/bin file for the crons and such.

View 2 Replies View Related

How To Downgrade CURL

May 8, 2008

I'm now running curl 7.18.1 and would like to donwgrade it to the previous version.

View 4 Replies View Related

Curl & GD On PHP5.2.5

Apr 12, 2008

I have PHP 5.2.5 compiled with GD library working on my webserver,
yesterday i wanted to add Curl Support, so i had to recompile php.

I downloaded and installed Curl latest version and tried to recompile PHP :

'./configure'
'--prefix=/usr/local/php'
'--enable-discard-path'
'--disable-force-cgi-redirect'
'--enable-shared'
'--disable-static'
'--disable-debug'
'--disable-rpath'
'--enable-pic'
'--enable-inline-optimization'
'--enable-memory-limit'
'--with-gd'
'--with-png-dir'
'--with-jpeg-dir'
'--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php'
'--with-pear=/usr/share/pear'
'--enable-magic-quotes'
'--enable-debugger'
'--enable-track-vars'
'--with-exec-dir=/usr/bin'
'--with-versioning'
'--with-mod_charset'
'--with-regex=php'
'--enable-track-vars'
'--enable-trans-sid'
'--enable-safe-mode'
'--enable-ctype'
'--enable-ftp'
'--with-gettext=/usr'
'--enable-posix'
'--enable-session'
'--enable-sysvsem'
'--enable-sysvshm'
'--with-openssl=/usr'
'--without-kerberos'
'--with-freetype-dir=/usr'
'--with-zlib=/usr'
'--with-zlib=/usr'
'--with-zlib-dir=/usr'
'--with-zlib-dir'
'--enable-xslt'
'--with-xslt-sablot'
'--with-iconv-dir=/usr/local/lib'
'--with-mysql-sock=/var/lib/mysql/mysql.sock'
'--with-mysql'
'--enable-mbstring=all'
'--enable-fastcgi'
'--enable-discard-path'
'--enable-force-cgi-redirect'
'--with-curl=/usr/local/curl'

I can't get it working, this is the error i get :

..

checking for T1lib support... no
checking whether to enable truetype string function in GD... no
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
If configure fails try --with-jpeg-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
If configure fails try --with-freetype-dir=<DIR>
configure: error: GD build test failed. Please check the config.log for
details.

I think i'm not the only one who is experiencing this problem, take a look here:
[url]

Why do PHP.net don't give much importance to this BUG?

I'm using the same OS : Centos 5

View 4 Replies View Related

Curl And Emails

Dec 5, 2007

I wanna install curl on my server its Centos 4.5 and SL told me I have around 30K mails pending on the serve can anyone tell me how to remove them from pending?

View 6 Replies View Related

Installing Curl?

Mar 16, 2007

I am trying to install curl on my server...

wget [url]
make
make install
ldconfig -v

This is what I haved done so far. Where do I go from here?
"Then use --with-curl in PHP's configure" this was the last step on the instructions but i do not know what it means.

View 1 Replies View Related

Install CUrl

Feb 9, 2007

I have been attempting to get curl installed on my server, but seem to have run into a snag. When I type:

curl-config --version

I get a response that I have: libcurl 7.16.0

However, when I try to install WHMCS, it still shows I do not have Curl with SSL support. I have used /scripts/easyapache, however there was never an option under 6 or 7 with CURL. I also tried with Cpanel WHM and used the Apache Update to 4.4.4 and checked both Curl options and OpenSSL. However still no luck.

I have also restarted services and rebooted the server.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved