[PHP] including PHP code from another server..

2012-03-26 Thread rene7705
Hi. My last thread got derailed into a javascript and even photoshop discussion, and while I can't blame myself for that really, this time I would like to bring a pure PHP issue to your scrutiny. I run several sites now, on the same shared hoster, but with such a setup that I cannot let PHP requi

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Stuart Dallas
REMOVE THAT SCRIPT FROM YOUR SERVER RIGHT NOW! See follow-up email direct to you for the reason! On 26 Mar 2012, at 14:53, rene7705 wrote: > Hi. > > My last thread got derailed into a javascript and even photoshop > discussion, and while I can't blame myself for that really, this time I > w

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Simon Schick
Hi, Rene I just want to say the same ... whatever you're trying to do here - it will end up in a major security-isse that (I think) you won't fix that soon as someone has hacked your server. That sounds like you don't wanna pay 10$ per month for a good multiple-domain-hosting solution. If you're

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Stuart Dallas
On 26 Mar 2012, at 15:17, Simon Schick wrote: > Hi, Rene > > I just want to say the same ... whatever you're trying to do here - it > will end up in a major security-isse that (I think) you won't fix that > soon as someone has hacked your server. I couldn't care less about Rene's stuff. It's com

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Stuart Dallas
On 26 Mar 2012, at 14:53, rene7705 wrote: > My last thread got derailed into a javascript and even photoshop > discussion, and while I can't blame myself for that really, this time I > would like to bring a pure PHP issue to your scrutiny. > > I run several sites now, on the same shared hoster, b

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Curtis Maurand
rsync is your friend. --C Stuart Dallas wrote: > On 26 Mar 2012, at 14:53, rene7705 wrote: > >> My last thread got derailed into a javascript and even photoshop >> discussion, and while I can't blame myself for that really, this time I >> would like to bring a pure PHP issue to your scrutiny.

[PHP] CURL -d

2012-03-26 Thread QI.VOLMAR QI
I have this lines: curl -H "Content-Type: application/json" -d "hello world" \ "http://api.pusherapp.com/apps/17331/channels/test_channel/events?"\ The option -d is for data. But How I can set it on the PHP CURL extension? I have found that if I set something like array('H

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Lester Caine
Curtis Maurand wrote: rsync is your friend. and is even available for windows machines ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engin

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Alex Pojarsky
Now, as the issue adressed and script removed, can you please explain what exactly are the issues of using such approach? I mean security ones, not performance. 2012/3/26 Lester Caine : > Curtis Maurand wrote: >> >> rsync is your friend. > > and is even available for windows machines ... > > -- >

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Jay Blanchard
[snip] This is one of "those" projects. It is apparently going to be trying every step of the way. [/snip] I was proven right this morning after all of Robert's good work and what I had added to make this work. It turns out that the one service who was anxious to consume the JSON output expect

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Stuart Dallas
On 26 Mar 2012, at 19:12, Jay Blanchard wrote: > [snip] > This is one of "those" projects. It is apparently going to be trying every > step of the way. > [/snip] > > I was proven right this morning after all of Robert's good work and what I > had added to make this work. It turns out that the

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Jay Blanchard
[snip] > Square brackets in JSON represent arrays. Take their JSON, run it through > json_decode, and assuming it decodes correctly compare the structure to what > you already have. You should then be able to modify what you have so it > generates JSON in the format they are expecting. [/snip]

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Stuart Dallas
On 26 Mar 2012, at 17:41, Alex Pojarsky wrote: > Now, as the issue adressed and script removed, can you please explain > what exactly are the issues of using such approach? I mean security > ones, not performance. It's the wrong solution to a process and organisation problem. Ultimately it's not

Re: [PHP] including PHP code from another server..

2012-03-26 Thread Alex Pojarsky
I understand what performance issues this brings, but as for security was just a bit curious. You have just showed me what I was thinking about, but you wrote it much better, clear and structured. Thank you. 2012/3/26 Stuart Dallas : > On 26 Mar 2012, at 17:41, Alex Pojarsky wrote: > >> Now, as t

Re: [PHP] CURL -d

2012-03-26 Thread Ashley Sheridan
On Mon, 2012-03-26 at 09:45 -0600, QI.VOLMAR QI wrote: > I have this lines: > curl -H "Content-Type: application/json" -d "hello world" \ > > "http://api.pusherapp.com/apps/17331/channels/test_channel/events?"\ > > The option -d is for data. But How I can set it on the PH

Re: [PHP] CURL -d

2012-03-26 Thread QI.VOLMAR QI
I know guess that it is a POST field, but the detail is on simulate the -d without a label. I've already looked at setopt man page, but nothing seems like what I need. 2012/3/26 Ashley Sheridan > ** > On Mon, 2012-03-26 at 09:45 -0600, QI.VOLMAR QI wrote: > > I have this lines: > cur

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Robert Cummings
On 12-03-26 02:12 PM, Jay Blanchard wrote: [snip] This is one of "those" projects. It is apparently going to be trying every step of the way. [/snip] I was proven right this morning after all of Robert's good work and what I had added to make this work. It turns out that the one service who w

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Jay Blanchard
[snip] > *lol* No worries... it's all about solving problems :) [/snip] the other folks who needed to consume the JSON have all done so successfully today - just this one. The guy who runs it was plenty arrogant when I discussed with him. He is the one who wanted me to remove the extra array nam

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Robert Cummings
On 12-03-26 05:14 PM, Jay Blanchard wrote: [snip] *lol* No worries... it's all about solving problems :) [/snip] the other folks who needed to consume the JSON have all done so successfully today - just this one. The guy who runs it was plenty arrogant when I discussed with him. He is the on

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Jay Blanchard
[snip] > Did you end up with a satisfactory output? It's not overly difficult to > generate an array instead of an object. [/snip] I did for all but this one instance. Are you saying that it would be easy to make of the children arrays? I thought they were already - am I missing something? --

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Robert Cummings
On 12-03-26 06:52 PM, Jay Blanchard wrote: [snip] Did you end up with a satisfactory output? It's not overly difficult to generate an array instead of an object. [/snip] I did for all but this one instance. Are you saying that it would be easy to make of the children arrays? I thought they w

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Jay Blanchard
[snip] On Mar 26, 2012, at 5:58 PM, Robert Cummings wrote: > On 12-03-26 06:52 PM, Jay Blanchard wrote: >> [snip] >>> Did you end up with a satisfactory output? It's not overly difficult to >>> generate an array instead of an object. >> [/snip] >> >> I did for all but this one instance. Are you

RES: [PHP] CURL -d

2012-03-26 Thread Alejandro Michelin Salomon
Hi try this : $ch = curl_init(); curl_setopt ( $ch, CURLOPT_URL, "URL HERE" ); curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt ( $ch, CURLOPT_HEADER, 1 ); curl_setopt ( $ch, CURLOPT_TIMEOUT, 10); curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, false ); curl_setopt ( $ch, CURLOPT_SSL_VERI

Re: [PHP] Thinking out loud - a continuation...

2012-03-26 Thread Robert Cummings
On 12-03-26 07:05 PM, Jay Blanchard wrote: [snip] On Mar 26, 2012, at 5:58 PM, Robert Cummings wrote: On 12-03-26 06:52 PM, Jay Blanchard wrote: [snip] Did you end up with a satisfactory output? It's not overly difficult to generate an array instead of an object. [/snip] I did for all but