The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

Using SLIM POST/PUT operations at the backend

kundan.bapat's Avatar

kundan.bapat

04 Dec, 2012 12:03 AM

I see all examples related to the front-end - assuming the present of the web-server.
Both my client and server are at the back-end and need to run on the same box where an (irrelevant instance of Apache - port 80) is running.
No browser or web server involved!
I am looking for a sample Client (send POST request) and Server (act on the JSON input received there in);
where the server is set to listen for HTTP on say, port 3333..
Can someone please provide a pointer?

Thank you.
KB

  1. Support Staff 1 Posted by Brian Nesbitt on 04 Dec, 2012 03:38 AM

    Brian Nesbitt's Avatar

    Not exactly sure I understand your question. You can run Slim with the apache server and still hit it from the same machine.

    So no visual browser but what are you using to make the requests... ie. your client.?
    -a custom program in PHP -a custom program in another language -curl -telnet -something else?

  2. 2 Posted by kundan.bapat on 04 Dec, 2012 04:48 AM

    kundan.bapat's Avatar

    The apache server on the machine is not available for this project and is out of bounds.
    The client is a 'custom program in PHP'.
    The server is a 'custom program in PHP as well.

    Basically, I want to use REST over HTTP to transfer JSON formatted Payload.
    Here's am using REST/HTTP as a data exchange protocol like I would use socket-based communications in days past or RMI, etc.

    Does that make better sense than earlier :) ?

  3. 3 Posted by kundan.bapat on 04 Dec, 2012 04:27 PM

    kundan.bapat's Avatar

    Brian, let me clarify my question and the gap in my understanding more clearly:

    Does the 'Slim' framework itself contain the HTTP parser/generator?
    If not, the server will need it - and that is why I would need to install Apache - to exploit it's HTTP capability. If that is an overkill (Apache's much more than a light-weight HTTP parser), is there something else (a PHP lib) I can use for it?

    As far as client is concerned, I see that Slim has the get/post/put methods - so Slim definitely has the HTTP protocol generation capability.

    Do I understand this correctly? If not please suggest what am I missing?

    Thanks Brian.

  4. Support Staff 4 Posted by Brian Nesbitt on 05 Dec, 2012 03:52 AM

    Brian Nesbitt's Avatar

    No, Slim doesn't contain a web server. Typically its run behind apache, nginx or lighttpd.

    I use nginx (http://docs.slimframework.com/pages/routing-url-rewriting/#nginx) infront of php-fpm (http://php.net/manual/en/install.fpm.php).

    As for the client I would look at something like:
    https://github.com/fabpot/Goutte
    http://guzzlephp.org/

  5. 5 Posted by impsYAdiz on 06 Jan, 2016 12:22 AM

    impsYAdiz's Avatar

    Hello, Community!

    The Company - PerfectVPN . Com

    Anonymous Internet Surfing, Anonymous File Sharing Torrent-P2P, Amonymous WiFI.
    Fully Automatic and Anonymous VPN Service NO Logs , You don’t have to waste time on:

    1 - Access to all servers for just 9 EURO.
    DoubleVPN, OPENVPN and PPTP / L2TP / IpSec VPN - Access to 40 Servers in 29 Countries!
    Subscribe to All Servers of Our Service for 9 Euro Month; 3 months = 20 Euro; 6 months = 35 Euro; 1 year = 55 Euro.
    Types of VPN connections included in a single subscription - DoubleVPN and OpenVPN.
    The Speed Of All Our Servers OpenVPN = 1000 M.Bit / Unlimited Traffic !!!

    2 - Unique “VPN Client” is easy to install on All Kinds of Operating Systems: MAC / Windows / Linux / Android !!!
    Will allow you to switch easily between the VPN servers in:

    Will allow you to switch easily between the VPN Servers in:

    USA
    Germany
    Canada
    Austria
    Czech Republic
    Denmark
    Egypt
    Hong Kong
    Iceland
    India
    Italy
    Latvia
    Luxembourg
    Malaysia
    Netherlands
    Norway
    Panama
    Romania
    North Africa
    Spain
    Switzerland
    Sweden
    England
    Vietnam
    Australia

    In the near future our service will be available in Spain, Greece, Sweden, Mexico, Czech Republic, Poland, China, Belgium ...

    3 - The program features an easy configuration of a VPN connection to your Internet:
    - Automatically Block Internet Connection when Disconnected from a VPN. - Automatic connection to the VPN when you turn on the Internet.

    4 - Also,our Service has a unique N-tier, Partnership Program:
    You will get 30% of total payments of your customers!

    5 - Company Takes All Kinds Of Payments in Full Auto Mode!
    WebMoney / Visa / Master Card / PayPal / Perfect Money / BitCoin / SMS and many others.

    Our Anonymous VPN Service Is Here!

    http://www.talkgold.com/forum/r355953-.html

    PerfectVPN . Com

    Disguise Your Internet Connect!

    ICQ : 6850058
    Skype : In-Disguise-VPN

    Sincerely, Your Anonymous VPN Service : PerfectVPN . Com

  6. 6 Posted by jeriYAdiz on 13 Feb, 2016 02:17 AM

    jeriYAdiz's Avatar

    Hello, Community!

    The Company - PerfectVPN . Com

    Anonymous Internet Surfing, Anonymous File Sharing Torrent-P2P, Amonymous WiFI.
    Fully Automatic and Anonymous VPN Service NO Logs , You don’t have to waste time on:

    1 - Access to all servers for just 9 EURO.
    DoubleVPN, OPENVPN and PPTP / L2TP / IpSec VPN - Access to 40 Servers in 29 Countries!
    Subscribe to All Servers of Our Service for 9 Euro Month; 3 months = 20 Euro; 6 months = 35 Euro; 1 year = 55 Euro.
    Types of VPN connections included in a single subscription - DoubleVPN and OpenVPN.
    The Speed Of All Our Servers OpenVPN = 1000 M.Bit / Unlimited Traffic !!!

    2 - Unique “VPN Client” is easy to install on All Kinds of Operating Systems: MAC / Windows / Linux / Android !!!
    Will allow you to switch easily between the VPN servers in:

    Will allow you to switch easily between the VPN Servers in:

    USA
    Germany
    Canada
    Austria
    Czech Republic
    Denmark
    Egypt
    Hong Kong
    Iceland
    India
    Italy
    Latvia
    Luxembourg
    Malaysia
    Netherlands
    Norway
    Panama
    Romania
    North Africa
    Spain
    Switzerland
    Sweden
    England
    Vietnam
    Australia

    In the near future our service will be available in Spain, Greece, Sweden, Mexico, Czech Republic, Poland, China, Belgium ...

    3 - The program features an easy configuration of a VPN connection to your Internet:
    - Automatically Block Internet Connection when Disconnected from a VPN. - Automatic connection to the VPN when you turn on the Internet.

    4 - Also,our Service has a unique N-tier, Partnership Program:
    You will get 30% of total payments of your customers!

    5 - Company Takes All Kinds Of Payments in Full Auto Mode!
    WebMoney / Visa / Master Card / PayPal / Perfect Money / BitCoin / SMS and many others.

    Our Anonymous VPN Service Is Here!

    https://bitcointalk.org/index.php?topic=143537.0

    PerfectVPN . Com

    Disguise Your Internet Connect!

    ICQ : 6850058
    Skype : In-Disguise-VPN

    Sincerely, Your Anonymous VPN Service : PerfectVPN . Com

  7. 7 Posted by koolblack on 23 Nov, 2016 01:11 PM

    koolblack's Avatar

    Web Shop : http://kool.black/
    Skype : kool.blackshop

    DEAR CUSTUMERS

    We selling SPAMMING TOOLS

    - Fresh SMTP - IP or Domain - ISP specified , SMTP checker is available too .
    - Fresh RDP - USA & WorldWide - Administrator - With AMS or TurboMailer ( port 25 opened ) .
    - cPanel - Long lasting cPanels - Domain works .
    - PHP Mailer - High sending quota & Delivering Inbox .
    - PHP Shell - Upload, Unzip & Delivering Working .
    - Webmail - Inbox Delivering & high sending quota

    ACCOUNTS

    - Dating PAID Account : MATCH , POF , Zoosk , OkCupid , EHARMONY
    - Alibaba account , FEDEX , UPS...ect

    EMAIL LEADS TARGET

    - Company leads , Business leads, Alibaba leads , jobseeker leads, Bank leads, WorldWide ...ect
    All fresh and we got from database , valid 100% , spam get good result

    Thank for read my advertise !

    Best Regards,
    KOOL BLACK

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac