[prev in list] [next in list] [prev in thread] [next in thread]
List: nyphp-talk
Subject: Re: [nyphp-talk] Remote php call
From: Fernando Gabrieli <fgabrieli () gmail ! com>
Date: 2009-03-24 20:04:30
Message-ID: be1d525a0903241304j34d701fcuc4740b26eebb0abd () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
dont forget the SSL options for cURL if you are using HTTPS
best
fernando
2009/3/24 <y2rob@aol.com>
> yeah i think curl is probably the best way. plus i'm not sure if you
> have control over the service your calling, but if you do you can make it
> only reply to post requests, set authentification to the post request and
> other stuff to prevent malicious attacks. there are options for ssl
> authentification, i had to use curl for a wsdl with user authentification
> and just recently i created a quick curl call to a ruby webservice i
> created. it's quick, easy and gets the job done.
>
> ~rob
> -----Original Message-----
> From: Brent Baisley <brenttech@gmail.com>
> To: NYPHP Talk <talk@lists.nyphp.org>
> Sent: Tue, 24 Mar 2009 12:47 pm
> Subject: Re: [nyphp-talk] Remote php call
>
> Curl is the better way to go, but if you just need to hit a page on
>
> another server you can use
>
> file_get_contents("http://domain.com/script.php?param=a");
>
>
> file_get_contents doesn't handle errors, failures, redirects,
>
> timeouts, etc. very well, which is why curl is better. But in a pinch,
>
> file_get_contents works.
>
>
> Brent
>
>
> 2009/3/23 Michele Waldman <mmwaldman@nyc.rr.com>:
>
> > Sorry for this posting. I may20seem lazy but everyone wants me to do
>
> > everything right now and my daughter had 104 fever today.
>
> >
>
> >
>
> >
>
> > I’m pressed for time and I’ve got a baby to tend to right now.
>
> >
>
> >
>
> >
>
> > If I want to call a remote php script from a php file in a different
>
> > domain? Curl it?
>
> >
>
> >
>
> >
>
> > Michele
>
> >
>
> >
>
> >
>
> > _______________________________________________
>
> > New York PHP User Group Community Talk Mailing List
>
> > http://lists.nyphp.org/mailman/listinfo/talk
>
> >
>
> > http://www.nyphp.org/show_participation.php
>
> >
>
> _______________________________________________
>
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>
>
> ------------------------------
> *The Average US Credit Score is 692. See Yours in Just 2 Easy \
> Steps!<http://pr.atwola.com/promoclk/100126575x1220085203x1201389322/aol?redir=http: \
> %2F%2Fwww.freecreditreport.com%2Fpm%2Fdefault.aspx%3Fsc%3D668072%26hmpgID%3D62%26bcd%3DMarchAvgfooterNO62>
>
> *
>
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/show_participation.php
>
[Attachment #5 (text/html)]
dont forget the SSL options for cURL if you are using \
HTTPS<br><br>best<br>fernando<br><br><div class="gmail_quote">2009/3/24 <span \
dir="ltr"><<a href="mailto:y2rob@aol.com">y2rob@aol.com</a>></span><br><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;">
<div> <font face="Arial, Helvetica, sans-serif">yeah i think curl is probably the \
best way. plus i'm not sure if you have control over the service your calling, \
but if you do you can make it only reply to post requests, set authentification to \
the post request and other stuff to prevent malicious attacks. there are options for \
ssl authentification, i had to use curl for a wsdl with user authentification and \
just recently i created a quick curl call to a ruby webservice i created. it's \
quick, easy and gets the job done.<br>
<br>
~rob<br>
</font></div><div class="im">
-----Original Message-----<br>
From: Brent Baisley <<a href="mailto:brenttech@gmail.com" \
target="_blank">brenttech@gmail.com</a>><br>
To: NYPHP Talk <<a href="mailto:talk@lists.nyphp.org" \
target="_blank">talk@lists.nyphp.org</a>><br>
Sent: Tue, 24 Mar 2009 12:47 pm<br>
Subject: Re: [nyphp-talk] Remote php call<br>
<br>
</div><div style="margin: 0px; font-family: Tahoma,Verdana,Arial,Sans-Serif; \
font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<pre style="font-size: 9pt;"><tt><div class="im">Curl is the better way to go, but if \
you just need to hit a page on<br> another server you can use<br>
file_get_contents("<a href="http://domain.com/script.php?param=a" \
target="_blank">http://domain.com/script.php?param=a</a>");<br> <br>
file_get_contents doesn't handle errors, failures, redirects,<br>
timeouts, etc. very well, which is why curl is better. But in a pinch,<br>
file_get_contents works.<br>
<br>
Brent<br>
<br>
2009/3/23 Michele Waldman <<a href="mailto:mmwaldman@nyc.rr.com" \
target="_blank">mmwaldman@nyc.rr.com</a>>:<br></div> > Sorry for this posting. \
I may20seem lazy but everyone wants me to do<div class="im"><br> > everything \
right now and my daughter had 104 fever today.<br> ><br>
><br>
><br>
> I’m pressed for time and I’ve got a baby to tend to right now.<br>
><br>
><br>
><br>
> If I want to call a remote php script from a php file in a different<br>
> domain? Curl it?<br>
><br>
><br>
><br>
> Michele<br>
><br>
><br>
><br>
> _______________________________________________<br>
> New York PHP User Group Community Talk Mailing List<br>
> <a href="http://lists.nyphp.org/mailman/listinfo/talk" \
target="_blank">http://lists.nyphp.org/mailman/listinfo/talk</a><br> ><br>
> <a href="http://www.nyphp.org/show_participation.php" \
target="_blank">http://www.nyphp.org/show_participation.php</a><br> ><br>
_______________________________________________<br>
New York PHP User Group Community Talk Mailing List<br>
<a href="http://lists.nyphp.org/mailman/listinfo/talk" \
target="_blank">http://lists.nyphp.org/mailman/listinfo/talk</a><br> <br>
<a href="http://www.nyphp.org/show_participation.php" \
target="_blank">http://www.nyphp.org/show_participation.php</a><br> </div></tt></pre>
</div>
<div><br><font style="color: black; font-family: arial,san-serif; font-style: normal; \
font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; \
font-size-adjust: none; font-stretch: normal;"> <hr style="margin-top: 10px;"> <b>The \
Average US Credit Score is 692. <a \
href="http://pr.atwola.com/promoclk/100126575x1220085203x1201389322/aol?redir=http:%2F \
%2Fwww.freecreditreport.com%2Fpm%2Fdefault.aspx%3Fsc%3D668072%26hmpgID%3D62%26bcd%3DMarchAvgfooterNO62" \
target="_blank"> See Yours in Just 2 Easy Steps!</a></b></font> </div>
<br>_______________________________________________<br>
New York PHP User Group Community Talk Mailing List<br>
<a href="http://lists.nyphp.org/mailman/listinfo/talk" \
target="_blank">http://lists.nyphp.org/mailman/listinfo/talk</a><br> <br>
<a href="http://www.nyphp.org/show_participation.php" \
target="_blank">http://www.nyphp.org/show_participation.php</a><br></blockquote></div><br>
_______________________________________________
New York PHP User Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org/show_participation.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic