Page 1 of 1

Picking up varibles from another site??? Is it possible?

Posted: Sun Dec 29, 2002 5:40 pm
by Jade
Hey,
I run a php powered SIM game website (http://www.whiteoaks.idlegames.net) and I was wondering if there is anyway to pick up varibles from another person's website? For instance, there is a game called HorseLand (HorseLand.com) that passes generated number through ASP to keep its players from creating scripts. I was wondering if there was a way, for instance, for me to pick up the number on their site from my own site.

Let me know if you have any ideas,
Jade

Posted: Sun Dec 29, 2002 8:03 pm
by Gen-ik
It's not possible... and even if it was you would need to know the name of the variable(s) you are trying to steal.

You So Sure?

Posted: Sun Dec 29, 2002 9:25 pm
by Jade
What if i know the name of the varibles I want to get? Are you sure its not possible, I mean, when you declare something global its out there for you to use. What's to say you can't use globals off of other sites?

Jade

Posted: Sun Dec 29, 2002 11:18 pm
by kcomer
If the varibale is in a query string then it would be easy to use. What format or how are the varibales passed?

Post METHOD

Posted: Mon Dec 30, 2002 12:09 am
by Jade
Hey there,

They are using the POST method in ASP, never used that language before, but I know there has to be some way to pick up their varibles. Here's some of the code for example:

<form action="/Scripts/ENTERHORSE.asp" method="POST" onSubmit=" return confirm('Are you sure you want to enter this horse?')">
- | 1.1k | -- Since When?
<INPUT TYPE="submit" STYLE='font-weight:normal;font-size:10px;' VALUE="Enter this horse" >
<input type="hidden" value='6375457' name='class_id'>
<input type="hidden" value='2663858' name='horse_id'>
<input type="hidden" value='4' name='key5'>
<input type="hidden" value='DE983D' name='11'>
</form>

For instance, I want to pick up the code I've highlighted in GREEN. I know there has to be a way for me to pick that varible up from my site. Any suggestions?

try the file function or the fopen function

Posted: Mon Dec 30, 2002 8:39 pm
by lostboy
http://www.php.net/manual/en/function.file.php

http://www.php.net/manual/en/function.fopen.php

the problem may be that the data in the file is dymanically generated...what you are trying to do is to use have your server treat that file as a respose to a client (ie your server is making a http request to their server) and what you want is the completed page served to you...

not sure if either of these will do that...

hth

Posted: Tue Dec 31, 2002 8:44 am
by Beans
As lostboy has mentioned, if the data is dynamically created, you're dead.

Also, let's say the variable you want is not actually displayed on the page. It is only used to come up with another variable that would eventually get the code to show something on the page. The problem here lies in the way the internet works. Variables are stored in the web server's memory. One cannot just talk to another server and get the contents of that variable in the server's memory. If this is stored in a file, then it might be more possible. But directly getting it is not possible.

though it IS possible with ASP using a third party free comp

Posted: Tue Dec 31, 2002 11:33 am
by lostboy
see this article about how to do this...don't know if anyone has written something for this in java or php, there must be a way to do this