Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update CURL to follow Location headers

commit efc3843973e00a0b5c1a0a22e8aa22bc61d6d854 1 parent 42b0b03
@bdougherty bdougherty authored
View
1  oembed/php-example.php
@@ -17,6 +17,7 @@ function curl_get($url) {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
$return = curl_exec($curl);
curl_close($curl);
return $return;
View
1  simple-api/gallery/php-example.php
@@ -8,6 +8,7 @@ function curl_get($url) {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
$return = curl_exec($curl);
curl_close($curl);
return $return;
View
3  simple-api/oEmbed/php-example.php
@@ -12,6 +12,7 @@ function curl_get($url) {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
$return = curl_exec($curl);
curl_close($curl);
return $return;
@@ -36,7 +37,7 @@ function curl_get($url) {
<title>Vimeo Simple API and oEmbed Example</title>
</head>
<body>
-
+
<h1>Vimeo Simple API and oEmbed Example</h1>
<?php echo $embed_code ?>
View
5 simple-api/simple/simple.php
@@ -11,6 +11,7 @@ function curl_get($url) {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
+ curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
$return = curl_exec($curl);
curl_close($curl);
return $return;
@@ -35,7 +36,7 @@ function curl_get($url) {
</style>
</head>
<body>
-
+
<h1>Vimeo Simple API PHP Example</h1>
<div id="stats">
<img id="portrait" src="<?php echo $user->user->portrait_small ?>" />
@@ -51,6 +52,6 @@ function curl_get($url) {
<?php endforeach ?>
</ul>
</div>
-
+
</body>
</html>

1 comment on commit efc3843

Please sign in to comment.
Something went wrong with that request. Please try again.