Jump to content
Sign in to follow this  
GodlessSinner

Why I got @error executing this code?

Recommended Posts

GodlessSinner

$nPORT = 8092
$IP1 = GetIP() ;IP Adress is correct too;
If $MainSocket = -1 Then
While $MainSocket = -1 Or $MainSocket = 0
$MainSocket = TCPListen($IP1, $nPORT)
If @error Then
MsgBox(0, "", $IP1 & " port"& $nPORT &)
$nPORT +=1
EndIf
WEnd
EndIf

Please help.

EDIT: Error in ip adress. I not use proxy and I don't know why my IP is different what I see on www.whatismyip.com

Edited by GodlessSinner

_____________________________________________________________________________

Share this post


Link to post
Share on other sites
Jos

How would the IP stack of your PC be able to use your external IP address connected to your Router?

You need to use an Ipaddress that is owned by the PC running the script.


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
GodlessSinner

Probably need to use @IPAdress instead this php:

<?php

echo $_SERVER['REMOTE_ADDR'];

?>

Edited by GodlessSinner

_____________________________________________________________________________

Share this post


Link to post
Share on other sites
Jos

Probably need to use @IPAdress instead this php:

<?php

echo $_SERVER['REMOTE_ADDR'];

?>

Don't think these are related.

You need to do a Port-forward on the NAT router which is connected to the Internet for port 8092 to the IP address of your PC (Normally @IPAddress1 but needs checking)

The shown $_Sever value is the IP address of the person connecting to the PHP page.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×