(help)How to Create my Own Wapmaster Services?

Started on the old forum in August 2011 · view the original in the archive · old links redirect here

22 replies · 3,888 views · started 15 years ago · 1 min read

TL;DR · summary of 22 replies
  • Reply by arnage suggested adding two GET variables ($name and $url) on all links.
  • The thread concluded that creating a WAP master service is not as simple as just using two GET variables, requiring more complex logic for displaying data correctly.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

9 participants
jet05 Junior · 13 posts #1

Hi everyone please help us creating a wapmaster services like wapshared.com i'm just a newbie

something else Fellow · 2,296 posts #2

you will find most of the scripts on there .... on here just use the search button 😛

cwikyz Junior · 12 posts #3

Thats wery easy. . . Use 2 get's on top your file. . . Like: $name = $_GET["name"]; $url = $_GET["url"];

And on all your links add &name=$name&url=$url End wapmaster service maked. . . 😀 Do you understand. . 🙂 But first find scripts for making to service. . . Like gumslone chat. . . 😉

My FaceBook clone: http://secafe.freehostia.com

nimeshka Developer · 180 posts #4

hehe ya its easy.......First you get some good scripts and then as mentioned above use two GETs for title and url...

External image (may be gone)

I'm Proud to be a Sri Lankan!

cpg12 Junior · 32 posts #5

cwikyz you're right.. 🙂

arnage Lead · 811 posts #6

jet05 wrote: Hi everyone please help us creating a wapmaster services like wapshared.com i'm just a newbie

Than u should read this first: LINK

cwikyz wrote: Thats wery easy. . . Use 2 get's on top your file. . . Like: $name = $_GET["name"]; $url = $_GET["url"];

And on all your links add &name=$name&url=$url End wapmaster service maked. . . 😀 Do you understand. . 🙂 But first find scripts for making to service. . . Like gumslone chat. . . ;)

Nope, its not easy.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
cwikyz Junior · 12 posts #7

arnage wrote: Than u should read this first: LINK

Nope, its not easy.

Yes its easy. . . What is the problem to add get's, and on links shortcut to page with get results? Thats easy and for baby's. . . Sorry if me bad speak english. . . 😉

My FaceBook clone: http://secafe.freehostia.com

arnage Lead · 811 posts #8

Because those wapmaster services are not just two _GET's, its just two vars. Its a bit complicated than that.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
arnage Lead · 811 posts #10

Ajmalrasi wrote: it's simple as 123

Ok, make it and post the script here.

Plus, im mixed up this site with wapshare.us , wich no longer exists... 🤣

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
soul_reaper Developer · 83 posts #11

is easy if you know what you doing... if you try different methods until you get wat you want is not easy...nobody was born learned ,try yourself ,no one will give you ready-made...only if you pay for his work

The LORD is my shepherd, i shall not be in want. He makes me lie down in green pastures, he leads me beside quiet waters, he restore my soul. He guides me in path of righteousness for his name's sake. Even though i walk through the valley of shadow of death, i will fear no evil for you are with me.

arnage Lead · 811 posts #13

soul_reaper wrote: is easy if you know what you doing... if you try different methods until you get wat you want is not easy...nobody was born learned ,try yourself ,no one will give you ready-made...only if you pay for his work

Kidding bro? He said he is a newbie.

jet05 wrote: Hi everyone please help us creating a wapmaster services like wapshared.com i'm just a newbie

Ajmalrasi wrote: use some logic and create.

And if to you is all as a "123" and all so logical, so far you could help him and write snipet properly, instead of stupid interruptions and spamming topic. Make sure you next time your post at least looks like this:

<?php

if (isset($_POST['submit'])) {
if (isset($_POST['name']) && isset($_POST['linkname']) && isset($_POST['link'])) {
	$error = false;
		if ($_POST['name'] == '') {
	$error .= 'Name is empty<br/>';
	}
		if ($_POST['linkname'] == '') {
	$error .= 'Linkname is empty<br/>';
	}
		if ($_POST['link'] == '') {
	$error .= 'Link is empty<br/>';
	}
		if (!preg_match('/^http:\/\//', $_POST['link'])) {
   $_POST['link'] = 'http://'.$_POST['link'];
	}
	$datafile = 'data/users.dat';
		if (is_readable($datafile)) {
	$handle = @fopen($datafile, 'r');
	$output = fread($handle, filesize($datafile));
	$data = explode('-', $output);
		if ($data[0] == $_POST['name']) {
	$error .= 'Name is token<br/>';
	}
		if ($data[1] == $_POST['linkname']) {
	$error .= 'Linkname is token<br/>';
	}
		if ($data[2] == $_POST['link']) {
	$error .= 'Link is token<br/>';
	}
	fclose($handle);
	}
		if (empty($error)) {
	$name = htmlentities($_POST['name'], ENT_QUOTES, 'UTF-8');
	$linkname = htmlentities($_POST['linkname'], ENT_QUOTES, 'UTF-8');
	$link = htmlentities($_POST['link'], ENT_QUOTES, 'UTF-8');
		$writedata = "$name-$linkname-$link\n";
			if (is_writeable($datafile)) {
		$handle = @fopen($datafile, 'a');
		fwrite($handle, $writedata);
			}
		fclose($handle);
	} else {
		echo $error;
	}
		unset($error);
}
	header('Location: /');
	exit;
} else {
echo '
Registration<br/>
<form method="post" action="./index.php" enctype="multipart/form-data">
<p>
Name: <br/>
<input type="text" name="name" maxlength="50" value=""/><br/>
Linkname: <br/>
<input type="text" name="linkname" maxlength="50" value=""/><br/>
Link: <br/>
<input type="text" name="link" maxlength="50" value=""/><br/>
<input type="submit" name="submit" value="Register"/>
</p>
</form>';
}

?>

And this is just registration from the head, instead of "two GET"... Where is the rest of script... Im finished discussion what is simply to who.

Jet05 if u have any question u can ask here.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
Ajmalrasi Junior · 27 posts #14

use this on next page Name : <?php echo $name;?> Url : <?php echo $linkname; ?> Link : <?php echo $link; ?>

arnage Lead · 811 posts #15

Ajmalrasi wrote: use this on next page Name : <?php echo $name;?> Url : <?php echo $linkname; ?> Link : <?php echo $link; ?>

🤣 Nope, some other data needs to be displayed at this point, that information is useless for displaying as the user is just entered his name and site. And we come to a paradox situation where someone who says that its "easy as 123" actualy shows that he doesn't have a clue what is needed to do next even after he got part of code done. Also, $linkname var is not field name "Url" as URL stands for "Uniform Resource Locator" aka LINK, wich is the field below. Var $linkname is field Linkname and $link is... guess what.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
soul_reaper Developer · 83 posts #16

arnage wrote: Kidding bro? He said he is a newbie.

not kidding bro ,but let him try ,then if is something he don`t know post here and someone would help 😀

The LORD is my shepherd, i shall not be in want. He makes me lie down in green pastures, he leads me beside quiet waters, he restore my soul. He guides me in path of righteousness for his name's sake. Even though i walk through the valley of shadow of death, i will fear no evil for you are with me.

Ajmalrasi Junior · 27 posts #17

i know how to do it and i dont want to share it completely here. demo here

arnage wrote: 🤣 Nope, some other data needs to be displayed at this point, that information is useless for displaying as the user is just entered his name and site. And we come to a paradox situation where someone who says that its "easy as 123" actualy shows that he doesn't have a clue what is needed to do next even after he got part of code done. Also, $linkname var is not field name "Url" as URL stands for "Uniform Resource Locator" aka LINK, wich is the field below. Var $linkname is field Linkname and $link is... guess what.

oops sorry now corrected Name : <?php echo $name;?> Link Name: <?php echo $linkname; ?> Link : <?php echo $link; ?>

arnage Lead · 811 posts #18

soul_reaper wrote: not kidding bro ,but let him try ,then if is something he don`t know post here and someone would help :-D

Thats the point, the question is who. 🙂 For example, in this snipet that i wrote no one made a comment to explode delimiter (-) even though a site where we all now have the name coding**-**talk.com, not to mention missed structure at header() or loop through file which is all basic... And look at this persistent caricature...

Ajmalrasi wrote: i know how to do it and i dont want to share it completely here. oops sorry now corrected Name : <?php echo $name;?> Link Name: <?php echo $linkname; ?> Link : <?php echo $link; ?>

c c c c i can't believe my eyes.

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
jet05 Junior · 13 posts #19

Thankz for helping guys maybe i will try it later cause i'm still looking for a nice hosting and thinking for my domain name for my domain name

arnage Lead · 811 posts #20

Sure, take your time. Anyway here is the complete example of snippet, if u have any question about it feel free to ask.

<?php
if (isset($_POST['submit'])) {
	if (isset($_POST['name']) && isset($_POST['linkname']) && isset($_POST['link'])) {
		$error = false;
			if ($_POST['name'] == '') {
				$error .= 'Name is empty<br/>';
			}
			if ($_POST['linkname'] == '') {
				$error .= 'Linkname is empty<br/>';
			}
			if ($_POST['link'] == '') {
				$error .= 'Link is empty<br/>';
			} else {
			if (!preg_match('/^(http:\/\/)?[a-z0-9-_.]+\.([a-z]{2,4})+$/D', $_POST['link'])) {
				$error .= 'Invalid link format<br/>';
			}
			if (strpos($_POST['link'], 'http://') === false) {
				$_POST['link'] = 'http://'.$_POST['link'];
			}
			}
		$datafile = 'data/users.dat';
			if (is_readable($datafile)) {
				$handle = @fopen($datafile, 'r');
				$output = fread($handle, filesize($datafile));
				if ($output != '') {
				for ($i = 0; $i < count($output); $i++) {
				$data = explode(',', $output[$i]);
				if ($data[0] == $_POST['name']) {
					$error .= 'Name is token<br/>';
				}
				if ($data[1] == $_POST['linkname']) {
					$error .= 'Linkname is token<br/>';
				}
				if (trim($data[2]) == $_POST['link']) {
					$error .= 'Link is token<br/>';
				}
				}
				}
				fclose($handle);
			} else {
			echo 'Can\'t find data file<br/>';
			return;
			}
	if (empty($error)) {
	$name = (strlen($_POST['name']) <= 50) 
? htmlentities(str_replace(',', ',', trim($_POST['name'])), ENT_QUOTES, 'UTF-8') 
: htmlentities(str_replace(',', ',', substr(trim($_POST['name']), 0, 50)), ENT_QUOTES, 'UTF-8');
	$linkname = (strlen($_POST['linkname']) <= 50) 
? htmlentities(str_replace(',', ',', trim($_POST['linkname'])), ENT_QUOTES, 'UTF-8') 
: htmlentities(str_replace(',', ',', substr(trim($_POST['linkname']), 0, 50)), ENT_QUOTES, 'UTF-8');
	$link = (strlen($_POST['link']) <= 50) 
? htmlentities(str_replace(',', ',', trim($_POST['link'])), ENT_QUOTES, 'UTF-8') 
: htmlentities(str_replace(',', ',', substr(trim($_POST['link']), 0, 50)), ENT_QUOTES, 'UTF-8');
	$writedata = "$name,$linkname,$link\n";
		if (is_writeable($datafile)) {
			$handle = @fopen($datafile, 'a');
			fwrite($handle, $writedata);
			fclose($handle);
	echo 'Hello '.$name.', thank you for registering.<br/>Set this link to your site:<br/>
'.htmlentities('<a href="./service.php?link='.$link.'">'.$linkname.'</a>', ENT_QUOTES, 'UTF-8').'<br/>';
		} else {
		echo 'Can\'t find data file<br/>';
		return;
		}
	} else {
	echo $error;
	unset($error);
	}
	}
} else {
echo '
Registration<br/>
<form method="post" action="./index.php" enctype="multipart/form-data">
<p>
Name: <br/>
<input type="text" name="name" maxlength="50" value=""/><br/>
Linkname: <br/>
<input type="text" name="linkname" maxlength="50" value=""/><br/>
Link: <br/>
<input type="text" name="link" maxlength="50" value=""/><br/>
<input type="submit" name="submit" value="Register"/>
</p>
</form>';
}
?>

... str_replace(',', '& # 4 4 ;', ...

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close