Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'django.': 0.05; 'output': 0.05; 'string': 0.09; 'back.': 0.09; 'subject:script': 0.09; 'python': 0.11; 'code?': 0.16; 'expects': 0.16; 'subject:PHP': 0.16; 'code.': 0.18; 'app': 0.19; 'later': 0.20; 'code,': 0.22; 'input': 0.22; 'to:name:python- list@python.org': 0.22; "i've": 0.25; 'script': 0.25; 'first,': 0.26; 'post': 0.26; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'view.': 0.31; 'subject: (': 0.35; 'subject:with': 0.35; 'convert': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'html,': 0.36; 'templates': 0.36; 'to:addr:python- list': 0.38; 'issue': 0.38; 'to:addr:python.org': 0.39; 'subject:skip:C 10': 0.61; 'heavy': 0.81; 'curl': 0.84; 'lifting': 0.84; 'route': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tMv/C5vimOavXmEJswfkh0lHnkTmSSOGZ09ZVxlUoF0=; b=HE29PC9q41BVYvMGWgeSjp1/LCctS4cBl6sAMytN7ZLVPTr7BaR5U8Vx4eOzQj0/mU MWVbxly34WQ4NEpusnghLTC32HZl904zIziW+qhxl75fkJMtp+RxNJnT/IsNGOR+X/tJ A6c6jHlePe07P85Mkes/7lPx1kXV6HG1cgklaHPboNZ3bDjYBTWQrup8kWsRGPmHTwAp 3mf3yMLlJo75BNgz3uVIomtiDeXwzei2ES+KPVXTG05IjtI+90Hf4t0BEeRBhV0MlZ9q 6yuVF4cClWXKigZqmd/fSTIstFgXSZ0zNygyT5eBpDPGb/U+Zete1nwy6CEYg5nPGpEr nbig== MIME-Version: 1.0 X-Received: by 10.194.63.229 with SMTP id j5mr55322406wjs.23.1415720921371; Tue, 11 Nov 2014 07:48:41 -0800 (PST) Date: Tue, 11 Nov 2014 10:48:41 -0500 Subject: Communicating with a PHP script (and pretending I'm a browser) From: Larry Martell To: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1415720928 news.xs4all.nl 2906 [2001:888:2000:d::a6]:57499 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3600 X-Received-Body-CRC: 3590522742 Xref: csiph.com comp.lang.python:80529 I have a PHP app that I want to convert to django. But I want to do it stages. All the heavy lifting is in the PHP code, so first, I want to just use templates and views to generate the HTML, but still call the PHP code. Then later convert the PHP to python. My issue is that the PHP code expects to get all it's input from the REQUEST object and I've consumed that in the view. Is there any way I can somehow supply that to the PHP code? Is there some way python can communicate like curl ... it needs to send the request string in the body of a POST request to the URL that will route to the PHP script and get the output back.