Created
November 15, 2012 20:43
-
-
Save vvoody/4081124 to your computer and use it in GitHub Desktop.
php curl remote
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ch = curl_init("https://api.twitter.com/"); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept-Encoding: gzip")); | |
header ("Content-Encoding: gzip"); | |
$data = curl_exec($ch); | |
curl_close($ch); | |
//echo $data; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
upstream php-fpm { | |
server 127.0.0.1:9000; | |
} | |
server { | |
listen 80; | |
root /var/www/; | |
autoindex on; | |
default_type text/plain; | |
location / { | |
allow all; | |
} | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass php-fpm; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name; | |
fastcgi_connect_timeout 60; | |
fastcgi_send_timeout 180; | |
fastcgi_read_timeout 180; | |
fastcgi_buffer_size 128k; | |
fastcgi_buffers 4 256k; | |
fastcgi_busy_buffers_size 256k; | |
fastcgi_temp_file_write_size 256k; | |
fastcgi_intercept_errors on; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment