Jump to content

Why I got @error executing this code?


Recommended Posts

$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

_____________________________________________________________________________

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...