Raised This Month: $ Target: $400
 0% 

Data with sockets


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 05-08-2011 , 06:04   Data with sockets
Reply With Quote #1

Hi,
It is possible to get certain data from a .php file using the sockets module?
For example in a test.php i have:
Code:
$something = "value";
The $something variable i want to get it, can be done it?
Clauu is offline
ProIcons
Senior Member
Join Date: Jan 2009
Location: Greece - Salonica
Old 05-08-2011 , 08:56   Re: Data with sockets
Reply With Quote #2

PHP Code:
$something "value";
if (
$_GET['get'] == "something")
{
   echo 
$something

and in the servers socket

GET /test.php?get=something
...
__________________
function rb return $regsubex($$1-,/(.)/g,$+($chr(2) $+ $chr(3),$r(2,15),$chr(2),\1))
ProIcons is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 05-08-2011 , 09:34   Re: Data with sockets
Reply With Quote #3

Can you please give a working example?
Clauu is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-08-2011 , 10:23   Re: Data with sockets
Reply With Quote #4

Clauu
Sockets and webservers
__________________

SonicSonedit is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 05-08-2011 , 10:40   Re: Data with sockets
Reply With Quote #5

Yes i know but for some reasons that example is not working properly .. that task - connect_web is returning nothing.
Clauu is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-08-2011 , 10:48   Re: Data with sockets
Reply With Quote #6

Clauu
Did you change
PHP Code:
#define SCRIPT_NAME "/myplugin/parser.php" 
#define REMOTE_HOST "myserver.com" //port d.80 
?
__________________

SonicSonedit is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 05-08-2011 , 10:53   Re: Data with sockets
Reply With Quote #7

Obviously .. Everything is ok the connection is established but nothing is returned.
Clauu is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-08-2011 , 11:01   Re: Data with sockets
Reply With Quote #8

That's strange.
Add logging to check what exactly you send. And what exactly returned. Re-check your php file.
__________________

SonicSonedit is offline
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 05-08-2011 , 11:17   Re: Data with sockets
Reply With Quote #9

Logging for what ? that plugin is mented to retrieve some data from that .php file.
If i remove the if statement - if (equal(line_variable, "some_value")) this is what i get:
Code:
Value is 200
Value is Sun,
Value is Apache/2.2.9
Value is PHP/5.2.6-1+lenny9
Value is Accept-Encoding
Value is 42
Value is text/plain
Value is text/plain
Value is text/plain
So seems that is an error in the plugin since the connection is ok.
Clauu is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-08-2011 , 11:28   Re: Data with sockets
Reply With Quote #10

Traffic log seems ok.
So the problem you don't get any response for your request?
__________________


Last edited by SonicSonedit; 05-08-2011 at 11:35.
SonicSonedit is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:24.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode