Jump to content

blesseld

Members
  • Posts

    90
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

blesseld's Achievements

Member

Member (2/5)

0

Reputation

  1. Hey All, I will be marketing a simple php script shortly and would like to Obfuscate my code and have it check to see if the person is running the script on the proper domain, much like other Purchased Scripts, you have to buy licenses and some are limited to a Per Domain basis. Could I use cURL to run a script on another server (mine) that takes the URL it came from, and a variable "the auth key" and check if the person is using the script on the proper domain? If the domain and auth key don't match in the DB i would return a message saying invalid key or something, else continue to execute the script. <?php //authkey would be defined in config file $authkey = "769870afhljkzxf90436"; $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,"http://example.com/page.php?authkey=$authkey"); curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1); $buffer = curl_exec($curl_handle); curl_close($curl_handle); if (empty($buffer)) { print "Sorry, AuthServ is performing maintenance.....<p>"; } else { print $buffer; } ?> Is there a smarter way to do this? I don't have an extra 300 bucks to use something like ioncube, just looking for a general proper direction on going about this as I am totally clueless. thanks
  2. ...why is it always so hard here to get an answer? I am seeking a solution. I see this all over the place where you have to buy a license...that's all I am trying to achieve. I have a config file, with like 3 lines, and I tell them what to put in there with videos on setting up the database.... so ya the basic user that only knows how to setup the script based on the way I show them. What do you "experts" suggest I do.... am I better off just buying something, Or can I use encoding or obfuscation plus something that contents to my server/hit a page that runs a script and checks for something. If the guy that knows php wants to steal it, they are going to regardless.
  3. Thanks for the reply, and link I understand that the call back could be cut out, can I not have the script hit a page on my server that connects to a db with stored domain and auth key info? then if it doesn't match to what the user put in return the the auth key is invalid? I am catering to the basic user and not programmer...if a programmer really wants what I am offering they could probably get around whatever to get this thing to work on other domains.
  4. Hey All, I am looking for a way to setup licensing for a script i built, I am not to worried about the script being modified because I will have different tutorials on modifying things within the script, but I would like to restrict the use of the script to a Per Domain basis. I am looking for some resources or a foot in the right direction to achieve this. Basically, I am looking to setup an authentication code linked to a domain name. The user uploads the script, adds user/pass/authentication code. Are callbacks a way for me to setup a database with this info, and if the code doesn't match the domain it's not usable? perhaps by including an important file or command... thanks in advance for any info.
  5. This is what should end up in the file <?php $page_num = "1"; $pathtometa = $_SERVER["DOCUMENT_ROOT"].'/inc/meta.php'; include ("$pathtometa"); include ("$var/global-control.php"); include ("$var/page.php"); ?> domain.com/index.php the users are beginners and people that don't know any code...let alone setup a database... so the idea is to build a create page feature so they don't have to create new files and copy the code above, of course they would need to change the page number save the file then upload to the server domain.com/about.php <--page num = 2 <?php $page_num = "2"; $pathtometa = $_SERVER["DOCUMENT_ROOT"].'/inc/meta.php'; include ("$pathtometa"); include ("$var/global-control.php"); include ("$var/page.php"); ?> Here is the first page <?php if ($loggedin) { echo <<< _END <div class="clear"></div> <form method="post" action="admin-create-page-1.php"> <ul class="edit-form"> <li><label class="label">Title</label><br /><input class="text" type='text' maxlength='300' name='createcontent' value='$createcontent' /></li> <li><label class="label">Title</label><br /><input class="text" type='text' maxlength='300' name='createcontent1' value='$createcontent1' /></li> <li><label class="label">Title</label><br /><input class="text" type='text' maxlength='300' name='createcontent2' value='$createcontent2' /></li> <li><label class="label">Title</label><br /><input class="text" type='text' maxlength='300' name='createcontent3' value='$createcontent3' /></li> <li><label class="label">Title</label><br /><input class="text" type='text' maxlength='300' name='createcontent4' value='$createcontent4' /></li> </ul> <ul class="edit-form"> <li class="edit-form-submit"><input src="../themes/theme-admin/default-admin-template/images/meta-submit.jpg" type='image' value='createpage' name='createpage' /></li> </ul> </form> _END; } else header("Location: $admin_redirect"); die(""); ?> second page <?php if ($loggedin) { $createcontent = stripslashes($_POST['createcontent']); $createcontent1 = stripslashes($_POST['createcontent1']); $createcontent2 = stripslashes($_POST['createcontent2']); $createcontent3 = stripslashes($_POST['createcontent3']); $createcontent4 = stripslashes($_POST['createcontent4']); $string = '<?php $page_num = "'. $createcontent. '"; $pathtometa = '. $createcontent1. '; include ("'. $createcontent2. '"); include ("'. $createcontent3. '"); include ("'. $createcontent4. '"); ?>'; $fp = fopen("content-page-create-page.php", "w"); fwrite($fp, $string); fclose($fp); } else header("Location: $admin_redirect"); die(""); ?> right now it inputs the content i want in the file... I guess I need to see if I can setup a couple selects to save some variable for what the file should be called and then where to store it (directory)
  6. The Users of the template only need simple 5 page sites, and some of them don't have access to a db, plus it's not needed, I am just providing the tool.... I posted to soon... here is what I am working with now $string = '<?php $page_num = "'. $_POST["set_page_num"]. '"; $pathtometa = "'. $_POST["setpathtometa"]. '"; include ("'. $_POST["incvar1"]. '"); include ("'. $_POST["incvar2"]. '"); include ("'. $_POST["incvar3"]. '"); ?>'; $fp = fopen("content-page-create-page.php", "w"); fwrite($fp, $string); fclose($fp);
  7. Hey, I am trying to build a feature into my template that will automatically setup a page without having to create a file and paste the 5 lines of code, and then switch the page number automatically then upload it to the server.... No database either. this is what needs to be added into the file inorder for it to work as a page: <?php $page_num = "1"; $pathtometa = $_SERVER["DOCUMENT_ROOT"].'/inc/meta.php'; include ("$pathtometa"); include ("$var/global-control.php"); include ("$var/page.php"); ?> I can create a file and post to it...but I need exactly what's above $createcontent = stripslashes($_POST['createcontent']); fwrite($fp, $createcontent); fclose($fp); $filename = "createdfile.php"; $filehandle = fopen($filename, 'w') or die("can't open file"); if ($filehandle) { fwrite($filehandle, $createcontent); fclose($filehandle); } any help would be appreciated thanks
  8. Hey, I have file_get_contents working on my server, I am in the process of building a template that will then be distributed to multiple people, I would like to have a News/What's New box within the template so I can update it from my domain. My question: Will this work across other servers grabbing info from the server where my main domain is hosted, I tested between 2 domains on the same server, wondering when someone installs on there server if it will work or not? Thanks
  9. Hey All, I am trying to finish the last step of my site map generator for a template I built. Here is the Process: User Submits meta info and a URL (stored in a .php file) Sitemap tool loops through and grabs the URL's and adds them to a list (to be used in the sitemap) User copies list of URL's and pastes them into the tool Outcome is: <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.dev.domain.com/ </loc> <priority>1</priority> </url> <url> <loc>http://www.dev.domain.com/page-2.php </loc> <priority>0.83</priority> </url> <url> <loc>http://www.dev.domain.com/page-3.php </loc> <priority>0.67</priority> </url> <url> <loc>http://www.dev.domain.com/page-4.php</loc> <priority>0.5</priority> </url> </urlset> All I am trying to do now is have a form so the user can copy the above paste it into the text box and hit submit. That would open the sitemap.xml file and paste in the already formatted xml. Is this possible? Thanks for any help,
  10. Ok, I understand that, But would: domain.tld/my-page-name.php be better than domain.tld/page.php?page=my-page-name or does it not matter
  11. Hey, I started working on my Simple CMS... and I understand how to create/store content to a db, however I am having a hard time trying to figure out how to put it all together. My main problem is using the title to create a file that will then load the db content. website.com/my-page.php where my-page.php is stored in an Articles directory, with an include of some sort to retrieve the content. Can anyone point me in a good direction? Thanks, all help is appreciated.
  12. ...I don't think it's as easy as that.... I have a 60 page template site where I set meta description and keywords... what if someone wants to change their keywords? just appending won't work.
  13. Thanks, Definitely gives me a sense of direction on how I can achieve my end result. I will do some research and see what I can come up with. It's kinda like....if it's not to to daunting I will add it, if not I won't bother. Main reason there is NO database.... and I am making a DB version soon...things will be significantly easier using MySQL.
  14. Hey, I am currently using a form that submits Keywords, description, and page title. I currently use a separate file per page... it's a template site that does not have a database, and needs to remain without one. Contains 60 pages Is it possible to save all this data to 1 file instead 1 file per page? I would need to be able to open the "meta" file and ADD to it instead of Write over/replace what's there....as that's what happens now when you update your meta info. I am using the form to store variables to an array and then using fopen I store the variables to a file. Here is the form that submits the data $readmeta = file_get_contents("content-page-$cp_number-meta.php"); $metadata = unserialize($readmeta); extract($metadata); echo <<< _END <div class="clear"></div> <form method='post' action='admin-submit-meta.php?edit_page=$cp_number'> <ul class="edit-form" style="float: left;"> <li><label class="label">Select Template:</label> <select name="updatetemplate"> </select> </li> </ul> <ul class="edit-form" style="float: right;"> <li><label class="label-400">Current Template: <span style="color: #f06c32;">$artemplate</span></label></li> </ul> <div class="clear"></div> <ul class="edit-form"> <li><label class="label">Page Name</label><br /><input class="text" type='text' maxlength='300' name='updatemeta0' value='$arpagetitle' /></li> <li><label class="label">Title</label><br /><input class="text" type='text' maxlength='300' name='updatemeta1' value='$artitle' /></li> <li><label class="label">Keywords</label><br /><input class="text" type='text' maxlength='300' name='updatemeta2' value='$arkeyword' /></li> <li><label class="label">Description</label><br /><input class="text" type='text' maxlength='300' name='updatemeta3' value='$ardesc' /></li> </ul> <ul class="edit-form"> <li class="edit-form-submit"><input src="../themes/theme-admin/default-admin-template/images/meta-submit.jpg" type='image' value='Login' name='submit' /></li> </ul> </form> <div class="clear"></div> _END; Here is my Action page: $updatemeta0 = $_POST['updatemeta0']; $updatemeta1 = $_POST['updatemeta1']; $updatemeta2 = $_POST['updatemeta2']; $updatemeta3 = $_POST['updatemeta3']; $updatetemplate = $_POST['updatetemplate']; $value = array( 'arpagetitle' => "$updatemeta0", 'artitle' => "$updatemeta1", 'arkeyword' => "$updatemeta2", 'ardesc' => "$updatemeta3", 'artemplate' => "$updatetemplate" ); $fp = fopen("content-page-1-meta.php", "w"); fwrite($fp,serialize($value)); break;
  15. Hey All, I am trying to figure out how I can eliminate having to log in 2 times. There is no database. it just sets a session, but because the browser doesn't refresh you have to login 2 times. Looking for some sort of "check" solution... any suggestions? if (isset($_POST['username'])) { $username = $_POST['username']; $password = $_POST['password']; if ($username == "" || $password == "") { $error = "<div id=\"login-warning-box\"><center><p class=\"login-text\">Not all fields were entered.</p></center></div>"; } else { if ($username != "$set_username" || $password != "$set_password") { $error = "<div id=\"login-warning-box\"><p class=\"login-text\">Username/Password invalid.</p></div>"; } else { $_SESSION['username'] = $username; $_SESSION['password'] = $password; $admin_panel = "$admin_panel_url"; header ("Location: $admin_panel");//CHANGE DOMAIN die(""); } } } header.php ob_start(); session_start(); if (isset($_SESSION['username'])) { $username = $_SESSION['username']; $loggedin = true; } else $loggedin = false; thanks,
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.