News:

Wondering if this will always be free?  See why free is better.

Main Menu

I need include this php to specific topic

Started by MESWEB, December 30, 2014, 07:41:38 AM

Previous topic - Next topic

MESWEB

How to include this php:
<?
$sms_dostep_prefix = 'MPLX3';
$sms_dostep_klucz = '5fe8313c8c77419389e2332c87dd1eda';
$sms_dostep_kodowanie = 'utf';
$sms_dostep_test = 1;

include_once 'sms-dostep.php';
if(!sms_dostep(1,'M',5,'strefa',true)
&& !sms_dostep(2,'M',10,'strefa',true))
sms_dostep_pokaz('strefa');
?>


To only one topic like topic=23 or board=140.0

Arantor

Holder of controversial views, all of which my own.


MESWEB

Top of the file like:
<?
$sms_dostep_prefix = 'MPLX3';
$sms_dostep_klucz = '5fe8313c8c77419389e2332c87dd1eda';
$sms_dostep_kodowanie = 'utf';
$sms_dostep_test = 1;

include_once 'sms-dostep.php';
if(!sms_dostep(1,'M',5,'strefa',true)
&& !sms_dostep(2,'M',10,'strefa',true))
sms_dostep_pokaz('strefa');
?>
<html>
<body>
Ten dokument nalezy do strefy platnej.
</body>
</html>

Arantor

Um, why? Does it output anything to the page? If so, putting it above the <html> tag is probably a bad idea.
Holder of controversial views, all of which my own.


Bruce the Shark

Quote from: Arantor on December 30, 2014, 07:53:11 AM
Um, why? Does it output anything to the page? If so, putting it above the <html> tag is probably a bad idea.

hmm are we serious here

dude its best to place this code just after the <body> tag

Arantor

Well, that depends on what exactly this code would do. Maybe it should be run before any output, maybe it should be run inside the body tag, maybe it should be run at the end of the body tag.

Without knowing what this code does I can't give the best advice.
Holder of controversial views, all of which my own.


MESWEB

This code is for payed enter to site. You need sent SMS Premium to enter specific file. So how to use this code on a selected topic or topic?

Arantor

I'm still trying to figure out how this code is supposed to work exactly.

How does it get the data from the user? Does it return an error or exit or what if they don't have permission? This is important because there's so much stuff attached to when this stuff runs. Remember, putting it before <html> would mean putting it in every theme, but putting it in the topic code before the theme runs wouldn't prevent it from being accessed via other methods (SSI, recent, search, RSS, portals)

Preventing access to a given topic without using permissions is insanely difficult.
Holder of controversial views, all of which my own.


MESWEB

From support team of my SMS Premium i know only thing:
SMS script access is available in the downloads section . The script is very simple to use , simply :
1    download the script
2    Upload script on the server
3    In the script section and add parameters  call to sms_dostep
<?
$sms_dostep_prefix = 'MPLX3';
$sms_dostep_klucz = '5fe8313c8c77419389e2332c87dd1eda';
$sms_dostep_kodowanie = 'utf';
$sms_dostep_test = 1;

include_once 'sms-dostep.php';
if(!sms_dostep(1,'M',5,'strefa',true)
&& !sms_dostep(2,'M',10,'strefa',true))
sms_dostep_pokaz('strefa');
?>

In a zip file there is a 2 file php one example.php and sms-dostep.php

Arantor

So you don't even know how users are supposed to use it?
Holder of controversial views, all of which my own.


MESWEB

I want lock som of a topics wit this script - if someone need to enter this topic he need sent sms premium and he received code which one unlock topic.

Arantor

So, that script presumably tells the user they need to pay, and checks they have paid and all that stuff?

This is important to understand to place the code correctly.
Holder of controversial views, all of which my own.


MESWEB

Script receive code from user which one received from sms. Next Script countdown the time for which the code is valid.

Arantor

So does the script ask the user for this? Because this is important: if the script asks the user for this information, it also has to prevent the regular behaviour of the script running - thus I need to know how this stuff works...
Holder of controversial views, all of which my own.


MESWEB

Yes script showing Box with details about paying and have input box where You need enter valid code for enter the site.

Advertisement: