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
https://forums.phpfreaks.com/topic/85117-solved-anyone-care-to-help-a-noobie/
Share on other sites

Its the structure thats tricky.

 

For example:

 

POST /path/script.cgi HTTP/1.0
From: [email protected]
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.