']['countryName'];
$destinations.=$destination;
}
$url.=$origins.$destinations.'mode=drivinglanguage=fr-FRsensor=false';
$json = file_get_contents($url,0,null,null);
$details = json_decode($json, TRUE);
for ($i = 0; $i count($hotels); ++$i) {
$hotels = Set::insert
=drivinglanguage=fr-FRsensor=false';
$json = file_get_contents($url,0,null,null);
$details = json_decode($json, TRUE);
for ($i = 0; $i count($hotels); ++$i) {
$hotels = Set::insert($hotels,
$i.'.Hotel.distance',$details['rows']['0']['elements']['0']['distance']['value
Can you please try with the following code?
function view() {
Configure::write('debug', 0);
header('Content-type: image/jpeg;');
echo file_get_contents(WWW_ROOT . 'img' . DS . 'folder' . DS .
'test.jpg');
exit;
}
On Sun, Nov 2, 2008 at 4:36 AM, Giaco
, 11:10 am, Anupom [EMAIL PROTECTED] wrote:
Can you please try with the following code?
function view() {
Configure::write('debug', 0);
header('Content-type: image/jpeg;');
echo file_get_contents(WWW_ROOT . 'img' . DS . 'folder' . DS .
'test.jpg');
exit
[EMAIL PROTECTED] wrote:
Can you please try with the following code?
function view() {
Configure::write('debug', 0);
header('Content-type: image/jpeg;');
echo file_get_contents(WWW_ROOT . 'img' . DS . 'folder' . DS .
'test.jpg');
exit;
}
On Sun
-type: image/jpeg;');
echo file_get_contents(WWW_ROOT . 'img' . DS . 'folder' . DS .
'test.jpg');
exit;
}
On Sun, Nov 2, 2008 at 4:36 AM, Giaco [EMAIL PROTECTED] wrote:
Hello,
for security reasons and on the fly resizing I route all picture
requests
PROTECTED] wrote:
Can you please try with the following code?
function view() {
Configure::write('debug', 0);
header('Content-type: image/jpeg;');
echo file_get_contents(WWW_ROOT . 'img' . DS . 'folder'
. DS .
'test.jpg
.php.net/manual/en/function.ob-clean.php
before echoing out the file and then exiting
http://us3.php.net/manual/en/function.exit.php
like
Configure::write('debug', 0);
ob_clear();
header('Content-type: image/jpeg;');
file_get_contents(WWW_ROOT . 'img' . DS . 'folder' . DS . 'test.jpg');
exit
', 0);
header('Content-type: image/jpeg;');
echo file_get_contents(img/folder/test.jpg);
}
When I don’t send the header, I see the binary version of the image.
What could this possibly be?
--~--~-~--~~~---~--~~
You received this message because you
return a
blank page with only the words true or false on it. Testing it in the
browser works each time, I always get so see the expected result:
http://mysite.com/mycontroller/myremoteaction/KHBAKFNV3A/KJB909/OU9-
true
I need to query this URL from other PHP apps, and am using
file_get_contents
I do exactly what you describe. calling one CakeApp from another using
file_get_contents() and... it work perfectly.
General advice:
Security? have you set it to anything other than the defaults? Is the
remote action login-protected?
I ask since you say it works in the browser... and your
baffled.
On 13 May 2008, at 16:14, [EMAIL PROTECTED] wrote:
I do exactly what you describe. calling one CakeApp from another using
file_get_contents() and... it work perfectly.
General advice:
Security? have you set it to anything other than the defaults? Is the
remote action login-protected?
I
:14, [EMAIL PROTECTED] wrote:
I do exactly what you describe. calling one CakeApp from another using
file_get_contents() and... it work perfectly.
General advice:
Security? have you set it to anything other than the defaults? Is the
remote action login-protected?
I ask since you say
or false on it. Testing it in the
browser works each time, I always get so see the expected result:
http://mysite.com/mycontroller/myremoteaction/KHBAKFNV3A/KJB909/OU9 -
true
I need to query this URL from other PHP apps, and am using
file_get_contents() to do so. On my local test system this method
On Tue, May 13, 2008 at 9:39 AM, David Christopher Zentgraf
[EMAIL PROTECTED] wrote:
I have no idea what's going on, any ideas anybody?
Do I need to send something using context streams or so that browsers
do but PHP/curl don't for Cake to respond to me?
I am presuming that you have set
Okay, that's weird.
Setting Debug to 1 in core.php suddenly gives me an output.
Even though in my remote action I explicitly call:
$this-layout = 'ajax';
Configure::write('debug', 0);
Interestingly, if I set debug to 0 in core.php and try to turn it back
on in my action, it doesn't work
I am developing in cakePHP 1.1.18 on MAMP (Mac OSX), with Apache 2.2
and PHP 5.2.3. MAMP runs under my own username and the web directory
is owned by me too. Everything works fine.
When I transfer the code to the production server (Red Hat, Apache
2.2, PHP 5.1.6) and have the web directory owned
Are you sure about the permissions on sub-directory ? run chmod -R 777
on cache maybe
On Nov 15, 12:09 am, Zaza [EMAIL PROTECTED] wrote:
I am developing in cakePHP 1.1.18 on MAMP (Mac OSX), with Apache 2.2
and PHP 5.2.3. MAMP runs under my own username and the web directory
is owned by me
The whole tmp and cache directory is 777. Cake can write the cached
model files but then throws warnings when it tries to read them again.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to
I replaced the following line of codereturn file_get_contents($url);with
$curl_handle = curl_init($url);curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,10);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
$content = null;$content = curl_exec($curl_handle);
curl_close($curl_handle);return
Using any file functions (file_get_contents, fopen, etc.) against an
external URL is considered unsafe in general. Your best bet is to use
curl instead.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP
The library that uses the file_get_contents() function on the external URL is not my code, but I can modify the library to use curl I guess and notify the author.I guess what is stumping me here is why it works correctly with a plain linear PHP script, but not in Cake. Cake causes the server
I have found that in some cases my php from the command line is completely different from php as interpreted in the browser.Sam DOn 7/11/06, nate
[EMAIL PROTECTED] wrote:Yeah, that's really odd.The only thing that comes to mind is an
errant ini_set, but it doesn't look like Cake is setting
I have found the issue with command line being different as well in some environments.That is usually due to the webserver either being on a different host than your shell server or your webserver is using PHP through CGI.
Both of my situations are being executed by the webserver and output is in
include (via vendor or require, tried both) in my Cake environment I have problems with the file_get_contents() function.
This is the warning that comes upWarning: file_get_contents(): URL file-access is disabled in the server configuration
And the map will not load. The file which
25 matches
Mail list logo