Jump to content

[SOLVED] Anyone care to help a noobie?


djarvis270

Recommended Posts

Hi there, I need to create a PHP script, but I'm having trouble getting started:

 

The script is supposed to run from the terminal/command line and act as a front-end

to Google's Translate Text web service.

 

The page is found at http://translate.google.com/translate_t

 

I need to be able to make a POST request in my PHP script to that page

so I can have access to the POST variables, mainly the 2 text areas (original text and translated text)

and translation flag vars.

 

My question is... how?  I have been screwing around with fopen() and fsockopen(),

but to no avail.  Any hints/suggestions would be appreciated.

 

Thanks in advance.

Link to comment
Share on other sites

Its the structure thats tricky.

 

For example:

 

POST /path/script.cgi HTTP/1.0
From: frog@jmarshall.com
User-Agent: HTTPTool/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 32

home=Cosby&favorite+flavor=flies

 

All I can do is point you in that direction - sorry.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.