Sign in to follow this  
Followers 0
GodlessSinner

Why I got @error executing this code?

4 posts in this topic

#1 ·  Posted (edited)

$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



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.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          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  
Followers 0