PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Sat Aug 24, 2019 10:33 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Thu Nov 30, 2017 6:43 am 
Offline
Forum Commoner

Joined: Thu Aug 10, 2017 4:48 pm
Posts: 33


Top
 Profile  
 
PostPosted: Thu Nov 30, 2017 7:20 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA
Are you familiar with Javascript? Ever used things like if statements?


Top
 Profile  
 
PostPosted: Thu Nov 30, 2017 12:52 pm 
Offline
Forum Commoner

Joined: Thu Aug 10, 2017 4:48 pm
Posts: 33


Top
 Profile  
 
PostPosted: Fri Dec 01, 2017 2:48 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA
You can't do a JSON request to their site.

Make a PHP script on your site
Syntax: [ Download ] [ Hide ]
<?php

if (isset($_GET["email"])) {
        header("Content-Type: application/json");
        readfile("https://api.stopforumspam.org/api?json&email=" . urlencode($_GET["email"]));
} else {
        http_response_code(400);
}

then call that (with the email) in your AJAX.


Last edited by requinix on Mon Dec 04, 2017 5:43 am, edited 1 time in total.
readfile, not passthru. I wouldn't edit but that was a big mistake.


Top
 Profile  
 
PostPosted: Fri Dec 01, 2017 3:43 pm 
Offline
Forum Commoner

Joined: Thu Aug 10, 2017 4:48 pm
Posts: 33
Thanks


Top
 Profile  
 
PostPosted: Mon Dec 04, 2017 5:15 am 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4313
Location: Sofia, Bulgaria
Huh, passthru() ? Isn't it supposed to have a local command as a string parameter? I doubt it has a .

And I strongly advice people to use for getting remote content, instead of relying on unsafe file open calls.

_________________
There are 10 types of people in this world, those who understand binary and those who don't


Top
 Profile  
 
PostPosted: Mon Dec 04, 2017 5:38 am 
Offline
DevNet Master
User avatar

Joined: Wed Jun 27, 2007 9:44 am
Posts: 4313
Location: Sofia, Bulgaria

_________________
There are 10 types of people in this world, those who understand binary and those who don't


Top
 Profile  
 
PostPosted: Mon Dec 04, 2017 5:42 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6617
Location: WA, USA


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group