Skip to content

Instantly share code, notes, and snippets.

@vvoody
Created November 15, 2012 20:43
Show Gist options
  • Save vvoody/4081124 to your computer and use it in GitHub Desktop.
Save vvoody/4081124 to your computer and use it in GitHub Desktop.
php curl remote
<?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;
?>
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