473,795 Members | 2,854 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to process result from other servers?

leo
babelfish provides online translation service

if clicking one of my links containing:
http://babelfish.altavista.com/babel...ypage.show.php

all the following pages will contain the http://babelfish.altavista.com

i wonder if PHP is able to retrieve the translation result.

Thanks for your help.
Apr 26 '06 #1
5 1400
use fread() (http://us3.php.net/manual/en/function.fread.php) to save
the results of the page to a variable, then use a regexp or the such to
process out any cruft you don't want.

leo wrote:
babelfish provides online translation service

if clicking one of my links containing:
http://babelfish.altavista.com/babel...ypage.show.php

all the following pages will contain the http://babelfish.altavista.com

i wonder if PHP is able to retrieve the translation result.

Thanks for your help.


Apr 26 '06 #2
leo

"Joshie Surber" <jo**********@g mail.com> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
use fread() (http://us3.php.net/manual/en/function.fread.php) to save
the results of the page to a variable, then use a regexp or the such to
process out any cruft you don't want.


the problem falls on:

1) w/o javascript onclick function, how to embed the redirect header() into
a single click on text or icon? otherwise, infinite looping results...

2) once finished processing the result and write to a file, say,
result.php, but if my umask is not to allow execute by default (should not
change due to security concern), how then execute the result.php (need to be
php in order to ensure all the php functions containing in it to be usable)?


Apr 26 '06 #3
leo wrote:
"Joshie Surber" <jo**********@g mail.com> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
use fread() (http://us3.php.net/manual/en/function.fread.php) to save
the results of the page to a variable, then use a regexp or the such to
process out any cruft you don't want.

the problem falls on:

1) w/o javascript onclick function, how to embed the redirect header() into
a single click on text or icon? otherwise, infinite looping results...

2) once finished processing the result and write to a file, say,
result.php, but if my umask is not to allow execute by default (should not
change due to security concern), how then execute the result.php (need to be
php in order to ensure all the php functions containing in it to be usable)?


If you have a link to another site, then yes, any link clicked on at that site
will contain that sites link. That's how things are supposed to work. You're
clicking on thiner link, after all. Can you imaging what could happen if a site
could "capture" your browser?

First of all, you can't do it with a redirect. The redirect will never get back
to your script, so you won't be able to get the results.

As Joshie indicated, use fread() to get the page from babelfish. This allows
you to retrieve the page into a variable then do whatever you want with it -
massage it, display it, etc.

BTW - if you're looking to use babelfish as a cheap interpreter for your pages,
don't. Get someone who's a native speaker of that language to translate it for
you. If you don't understand what I mean, try translating one of your pages (or
even this post) to another language - then translate the results back.

The above paragraph, translated to French then back to English, comes out as:

BTW - if you look at to employ the babelfish as a cheap interpreter for your
pages, not. Obtain somebody which has a naturalness of this language to
translate it for you. If you do not include/understand what I want to say, the
test the translation of your pages (or even of this post) to another language -
translate the results then behind.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 26 '06 #4
leo

"Jerry Stuckle" <js*******@attg lobal.net> wrote in message
news:5o******** ************@co mcast.com...
leo wrote:
"Joshie Surber" <jo**********@g mail.com> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
use fread() (http://us3.php.net/manual/en/function.fread.php) to save
the results of the page to a variable, then use a regexp or the such to
process out any cruft you don't want.
the problem falls on:

1) w/o javascript onclick function, how to embed the redirect header()
into a single click on text or icon? otherwise, infinite looping
results...

2) once finished processing the result and write to a file, say,
result.php, but if my umask is not to allow execute by default (should
not change due to security concern), how then execute the result.php
(need to be php in order to ensure all the php functions containing in it
to be usable)?

If you have a link to another site, then yes, any link clicked on at that
site will contain that sites link. That's how things are supposed to
work. You're clicking on thiner link, after all. Can you imaging what
could happen if a site could "capture" your browser?

First of all, you can't do it with a redirect. The redirect will never
get back to your script, so you won't be able to get the results.

As Joshie indicated, use fread() to get the page from babelfish. This
allows you to retrieve the page into a variable then do whatever you want
with it - massage it, display it, etc.


redirect to a PHP generated by me. e.g. http://mypage/show.php contains a
statement:
header(Location : http://mypage/result.php);

so as long as result.php contains all the stuff I want, i remain dominant.
the problem still falls on that i don't know how to instruct to selectively
redirect (except javascript onclick).
BTW - if you're looking to use babelfish as a cheap interpreter for your
pages, don't. Get someone who's a native speaker of that language to
translate it for you. If you don't understand what I mean, try
translating one of your pages (or even this post) to another language -
then translate the results back.

The above paragraph, translated to French then back to English, comes out
as:

BTW - if you look at to employ the babelfish as a cheap interpreter for
your pages, not. Obtain somebody which has a naturalness of this language
to translate it for you. If you do not include/understand what I want to
say, the test the translation of your pages (or even of this post) to
another language - translate the results then behind.


i do agree with you that computer translation needs improvement, but as long
as my website is mainly composed of organized words - which the translation
result in this special case performs very well. What the dilemma i need to
confront with is that:

if i use babelfish, it will add babelfish site in each of the links. while
it is okay with static link, for that with php will fail.

e.g.

http://babelfish.altavista.com/babel...3fnew%3dOKF001

as i implement session, it is likely my server can't recognize the request
is originally sent by my client.

if i use fread and process the results, the problem is i need to memorize
the previous state of translation, perform the php function first and then
use redirect to the result page but in translated version.

maybe php does allow that, but studying sams php & mysql 3rd edition doesn't
give me hints (i wish i'm not overlooking).

Thanks for all your help!
Apr 26 '06 #5
leo wrote:
"Jerry Stuckle" <js*******@attg lobal.net> wrote in message
news:5o******** ************@co mcast.com...

redirect to a PHP generated by me. e.g. http://mypage/show.php contains a
statement:
header(Location : http://mypage/result.php);

so as long as result.php contains all the stuff I want, i remain dominant.
the problem still falls on that i don't know how to instruct to selectively
redirect (except javascript onclick).

Of course - you're redirecting to your own site, and you control the links on
that page. But you want to redirect to a different site, yet still retain
control. You can't do it.

Once the browser goes to the other site, nothing except operator intervention
will bring it back to your site!

i do agree with you that computer translation needs improvement, but as long
as my website is mainly composed of organized words - which the translation
result in this special case performs very well. What the dilemma i need to
confront with is that:

Are you sure? For instance - are you sure there are no confusing phrases in
the translated text?

Nowadays it is very easy to find a native speaker who will translate pages for
you for little or no cost. And the result is much more professional looking
than anything you get from a mechanical translator. Every time I see a page
translated into poor English I know read "CHEAP!"
if i use babelfish, it will add babelfish site in each of the links. while
it is okay with static link, for that with php will fail.

e.g.

http://babelfish.altavista.com/babel...3fnew%3dOKF001

as i implement session, it is likely my server can't recognize the request
is originally sent by my client.

if i use fread and process the results, the problem is i need to memorize
the previous state of translation, perform the php function first and then
use redirect to the result page but in translated version.

maybe php does allow that, but studying sams php & mysql 3rd edition doesn't
give me hints (i wish i'm not overlooking).

Thanks for all your help!


But the redirect isn't sent by YOUR client. It's sent by the browser. When the
user clicks on the link, their browser goes directly to babelfish. Your site
isn't even involved. So your server won't recognize the request - because it
never gets there.

The bottom line is - if you redirect to another site, that site is now in
control. Your site isn't involved any longer. And nothing YOUR server does can
change that.

That's why Joshie suggested fread(). It's the right way to do it.

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Apr 26 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
7479
by: Michael J. Moore | last post by:
Is it the listener process, or some other Oracle process. Also, on a UNIX system, when you do "ps -ef" to see your processes, the PPID points back to a process named "init". Why does the PPID not point to some other process like, for example, the listener, or PMON, or whoever spawned it. thanks, Mike
1
1203
by: JennL | last post by:
I have a web farm of 2 servers (so far). I have a script that creates ..HTML files and then I call a PDF writer to turn them into .pdf files. The problem is that I then have files on 2 different servers. I want to synchronize these servers so I write a VB.NET exe...which works if I run it manually when logged into the servers. The .exe copies any newer files to a non-web file server and also grabs any files from that server that are newer....
4
6597
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times. There is no consistency when it fails. Could anyone here shed some light on how to debug/resolve the issue. I guess IBM looked at the issue and were not able to pinpoint where the issue is. When the program hangs and when force the DB2...
10
14426
by: Sorin Dolha [MCSD .NET] | last post by:
I would like to start a process from C# code as another user. The C# code is executed as the ASPNET user because it relies in a Web Page class, and I would like that the process will run as another user to gain the required rights for execution (the external process needs to create a mailbox in Exchange, so it needs to be run as an Exchange Full Administrator-powered user). For the moment, I have tries using the Start() static method of the...
3
1707
by: Henrik Dahl | last post by:
Hello! From default, the ASPNET user is giving the process identity for the ASP.NET runtime environment of IIS, however it's possible to change the user by modifying the <processModel> element in the machine.config file. Is it possible to have multiple IIS servers running, each with their own user specified for the process identity or to specify the process identity specifically for each of the ASP.NET WebForms applications run by a...
2
2195
by: Sidharth | last post by:
Hello, We are experiencing some issues with the aspnet_wp process on our live servers. The problems are intermittent and we cannot reproduce it on our dev and test servers. Currently around twice a day the aspnet_wp process takes 100% of the cpu and causes the whole website to come to a stand still. We then have to end the process for the website to become useable. Once the aspnet_wp process recycled itself and in the event logs it...
1
2107
by: Martin Simard | last post by:
Hi all, In VS 2003, when I attach to a remote process for debugging, I can see the list of modules loaded by the process before attaching to it. This list is not there anymore in VS 2005. Instead, I just have a warning for security reasons and 2 buttons (Attach | Don't attach). Let me explain a bit... I have several web applications running on different servers. All servers are XP 2003 Servers with IIS 6. My applications runs in...
2
1691
by: 2401 members, members can post | last post by:
Always MultiPost and Cross-Post messages to enhance the chance to reach you. Bob Hi, Ever be in a position of too-much traffic ?
5
4961
by: Mirxon | last post by:
Hello, I'm working on a C program under Ubuntu. It's basd on socket. Browser calls a client cgi (C program), and send some parameters to server (C program). Server runs another program (ooimpress, open office ppt), and translate the commands from client to a key event, and send it to child process. For example.
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10448
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10167
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9046
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7544
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.