Jump to content

chadrt

Members
  • Posts

    124
  • Joined

  • Last visited

Everything posted by chadrt

  1. I guess I am back to the drawing board here as I cant seem to figure out why when I log in and then open the browser agian to a normally protected page it takes me back to the login screen. Or for that matter if I open the login screen again it doesnt just dump be back to the main screens of my new dispatch system. I dont normally use browse safe modes or incognito on my browsers and other sites keep me logged in just fine. For example I use gmail and I am always logged in there. And here on phpfreaks.com as well. So there must be a problem with how the page is reading in the cookies when i navigate away from the page.
  2. This may be a bit off topic from this thread but do you see any significant problem with opening and closing php code to accomodate html?
  3. It appears as though the cookies are destroyed as soon as the browser is closed. Is there a way to keep those there so that if you close out and return you are still logged in? Thanks again btw, Chad
  4. Would adding the code that you suggested into the top of the index.php page cause the initial cookie from the login page that we are setting as a day or a week to become only good for an hour?
  5. BTW I followed instructions here http://php.about.com/od/finishedphp1/ss/php_login_code.htm to create the main login system but the registration page has been removed because that is going to be an admin function.
  6. I have a dispatch system that I am building that on login it sets a cookie. I would like to make that cookie refresh itself everytime a page is accessed. Right now the cookie expires after 3600 seconds no matter what even if you are switching pages every 30 seconds. The cookie also expires when the page is closed out. first I want the cookie's time to be refreshed everytime the page is accessed and second I would like to see a check box on the login screen that will keep you logged for say 24hrs or a week. Something so that I dont have to log in every hour.
  7. Ok quick question what I do something like this? <?php if ($fileaccess9 != "allowRR783") { header("Location: index.php"); } ?> Because the index is a redirect to the login page which also check for cookie existence and will redirect them to the dispatch system main page if it exists, isnt expired and the user has not been suspended in the system. If I do this is this fail safe? Or is there some level of security I should be aware of doing it this way? Thanks again for your help...
  8. I am building a dispatch system for a roadside assistance company from scratch. It is interesting as I have never had a project this big before and my knowledge of php is sub-beginner. I am doing ok so far but I have a page that authenticates users after a login form sets a cookie. This form calls other pages into it using include($page.".php") but those pages can be called individually and I want them to be rendered useless unless they are called from within the main page. Thank you for your help.
  9. I have a DB of zips with lats and longs! And my locations all have lats and longs. Well at least all of them that will be factored into the distance search. I even found a real simple function that will perform the calculations. But I am a little confused about how to do this with some speed. The only way I can think to do this is to write a script that will check every single lat/long combo in the locations DB and create an array that also contains the newly calculated distance to each place in the entire database. Then sort by that distance and only show the ones that have xx miles or less! But alas I have no idea how to put something outside the DB into the array and it seems like calculating every single entry in the db would be very time consuming. Now that I have it all spelled out on here maybe I can get back to the editor and see if I can come up with something. If I do I will post it back here for the rest of the community to use. Thank you. Chad
  10. thorpe, That was so simple and all my reading thru the php manual and the different functions and I didnt see that it was that simple. Thank you so much. Chad
  11. This is still a perplexing little issue of mine! I have found a package that does this sort of thing but uses flat files and it is dreadfully slow so I am back at square 1 again. I have found many closely related scripts but they rely on a FULL store locator system where the entire scripts are based on a system that was especially desiged for storing the location information of stores etc. But not to retrieve my lat's and long's from a db and compare them to a lat and long provided by a zipcode directory. Then list the ones within x number of units (miles, kilometers, nautical miles etc.) from that zip code. Any suggestions would be great. Thank you...
  12. There is a wealth of information located across the internet. Awhile ago I wrote a very simple interface to pull information about Amateur Radio operators. Well I was just another face in a bunch of people that have created this same database and scripts to retrieve the info. Then at night I was watch TV and noticed an advertisement for a Joke service. Something poped in my mind and I said what if someone could send a txt message to receive this info and voila I was able to find a service provider that is FREE and I was able to get a simple php script set up. Now when someone txt's a "Short Code" for my service provider and sends the message CALLSIGN followed by a US based callsign the system checks a URL www.mysite.com/specialfolder/callsign.php?call=xx1xxx of course the call sign is just what was typed in the txt message. From concept to finished working product was a little over three hours. I was able to accomplish this task because I used Google and other search engines. I searced for things like "text messaging providers" this led me to information about companies and that those short number you txt to are called "Short Codes" eventually I found a site that lists them all for the USA and I was able to check them out and see what they had to offer and how much they were. Using one of these companies you can do just exactly what you are wanting to do. So the moral of the story is not to knock the people that say "Google it!" because they probably know from experience that Google and services like it can be of major help if you really apply yourself to finding it. Now since I have subjected you to my little speach about Google and my endevors I will give you two websites that will help you find what you are looking for. http://www.usshortcodes.com/ http://www.usshortcodeswhois.com/ (My Favorite Link) Using the links above you will be dealing with people who offer short codes and the second one you can find companies that do nothing but txt for you there are a range of folks that can help you in different ways. Wether it be to own your own short code (SPENDY $$$$) or to use someone elses or to just simply send only. Hope this helps you or anyone else that is looking for sms based services.
  13. I have a script that generates a file that has a 0 if it succeded or another number if it did not succede. It is always a single digit in the file and I would like to know how I can open that file and read it from a PHP script and assign it to a varriable. This way I can do something like this to rerun it at a later a point: if ($attempt == 0){ exit; }else{ # I will rerun the script that failed include('update.php'); }
  14. I have written some simple queries in PHP and I have even gone thru and changed code in prewritten scripts to make things more suited to me but this is one area that I really lost in now. The only way I can think to do this is to query every single entry in the DB (MySQL) and then run the calculation to assign distance values and then list the ones less than a given radius. This seems very processor intense and even difficult to do. Although I have many stores that have the ability to do this and I am very intrigued as to how I might program this. Any help would be great!! Thank you... Chad
  15. I have a script that does database lookups and I want to add a user list that will hold a member id and a number of allowed lookups each month. Then when they perform a lookup it would either auto increment with each lookup or auto decrement with each lookup. Thus I could set another field with that users allowed look ups for the month then run a cron job that would reset the variable field for that user. I am writing everything in PHP. Any help would be wonderful! Thank you!! (I hope I have the right forum was torn between mysql and php forum. Thanks again. Chad I just noticed the new math based forum about 3 seconds after posting this I am sorry for the posting in the wrong place!!
  16. When you said PHP I assumed you were talking of using PHP to access the data for perl. I had made a PHP script that operated in a shell environment so that the pl script could send the data to it and then have it process the query and return it in an all text format. My web site www.callsigndb.info is a site where I have all my stuff located for that project. I am even incorporating the call sign look up into the normal profile system that PHP-Nuke has in place. I added fields in the users table for all the added info and then query'd it as well and if the person sets the callsign in their profile information settings then when you look up their profile it shows their call sign lookup too. I am trying now to make it the other way as well but that is proving to be a bit more chalenging for a beginner like me. But when I started that project I knew nothing about databases or PHP or otherwise and that was about 6-8 weeks ago. I am getting there slowly but surely. (Next to tackle another language but not sure which one: Java, Perl, ASP, etc. have to really look into them!) Thank you so much for your work, you wouldnt happen to have an address I could send you something for your time? I am not a rich person but I'd sure like to at least buy you a nice steak diner or something for you and yours! Just send me a PM or something. Chad
  17. Wildbug, Just wondered if you had come up with anything. you had said you didnt want to work on something that wouldnt get used, believe me I understand that but I will use it. I did make that PHP script that works in a shell environment that will ask for the input, run the query and return the data. If that would be usefull I can zip that up for ya. If however you cannot spare the time then I definately understand that too. Just know that I appreciate the code you have already prepared for me. Thank you...
  18. This little project of mine is just not going well!! I am using code from another site and trying to incorporate it into PHP-Nuke as a module. So hopefully someone here knows PHP-Nuke and can help. I have been to two different Nuke specific sites but it has been a couple days since I posted so I hope someone can help. The module should be pretty straight forward but when you try and upload it doesnt work it just exits rather abnormally if I do say so myself. When that happens all the code on the page quits being processed and I have made sure there are no die or exit statements that would do this. But yet it is still happening. Here is the script that I am using in the modules index.php file http://callsigndb.info/external/index.txt that should be all that is needed. I tested the script out before I ever started turning it into a Nuke script. The thing I really love about this script is it resizes the script and can have a max upload size value as well. Any other uplaoder would surely fill my hard drive quota very quickly... Chad
  19. I understand why the feature has been implemented but my personal opinion, for what little its worth, is that it should be ok to edit up till a followup reply has been made.  Of course if you gave me a penny for my thoughts I would owe you change...
  20. I would like to see a link where a user can view all the posts they've started in an easy to reach place.  Sometimes I like to look at my posts and see what answers have been or refer back to them later on down the road.  This would be an easy way to see them at a glance and even mark them as solved once a person has had a chance to try out the suggestions that were left for him/her. The current link is ok but if you have already seen the posts, or marked it solved, or posted a follow up and not received any response back to your query then it is not shown. Thanks, Chad
  21. I now rent a Virtual Private Server and I have root access on it so I have adjusted all the max limits in the php.ini and my.cnf and so on to make sure my scripts run smoothly on my database that has so many records. With almost a million records I couldnt afford not to do that if I wanted any performance at all out my scripts. But thank you for your help!
  22. Still looking for a way to use GD within my existing script. The point here is to hide any text based entry of an email address in my scripts output wether that be in the browser or View Source. I know that there are bots that search the internet every second of every day scanning pages and their server output. While a varriable is hidden till it is echo'd a varriable placed into an < img > tag would not be as it would be placed in the server output. I would like to take my email address and have it displayed as an image within an existing script. I thank you so much to the person who pointed out to me the img tag was needed but unfortunately now that I know that is how you have to do that I need to find a way to do it differently. I just dont want those robots to use my site as a place of harvesting. I appreciate any help that could be sent my way, Thank YOU!!
  23. Ok I was able to modify the script and make it just right I can call it using ./call.php callsign and it is even formatted correctly too. So I think that is what you were talking about. I am glad to see that works good in the shell environment. If you need the script that I made let me know. All I made was the CALL search. The other things that the university telnet app is capable of is pretty nice and advanced but I am sure it is a lot of work to do that, especially for a hobby site like mine. I am now trying to find a way to open the port 2111. So I can get in to the script once it is there. Using what you already posted I am able to login via telnet on localhost using an SSH session. We'll see how it goes. Chad
×
×
  • 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.