Jump to content

Problem with external url in fetchRemote (#1006)


Misha_Konsta

Recommended Posts

Hi guys! I need a little help with my script. My script using to fetch text from my website page, but i have only 1006 error in fetchRemote function

I using my PC (for running mta server), have dedicated IP, and this code using for server side. This script tested on many URL's and using http/https protocol, and i have #1006 in ErrFetch

function getVotiferInfo(playerSource) 
  fetchRemote('https://samplewebsite.com/textpage.php', 
    function(data,err) 
    if err == 0 then 
    outputChatBox("Text Info: "..data,playerSource) 
    else 
    outputChatBox("ErrFetch: "..err,playerSource) 
    end 
    end,"",false) 
end 
addCommandHandler("vote",getVotiferInfo)

Thanks:$

Edited by Misha_Konsta
Link to comment
12 hours ago, CodyL said:

Client side function only works with the server the player is connected to or it will return the error #1006

Oh crap I'm sorry didn't ready you had it server side, this just means it's not allowing the destination Ip for what ever reason.

Not really, error number 1006 is not a curl error, its added by mta and the only use for it is client sided when trying to connect anywhere that is not the same IP as the server youre connected to.

So are you sure that youre running that code on the server?

Edited by MIKI785
Link to comment

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
  • Recently Browsing   0 members

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