PHP - Turn Script For Single Person Into Online Service?
I almost posted this in the freelancing forum, because I am looking for it to be created, but I first needed more info on what a coder would need to know about the project.
I have a script that is designed for a single person, and I want a coder to design it to become an online service with user registration, etc. I'm weary of posting publicly the details about what the script does, but is something like that needed in order for a php programmer to take on a job? Could something like that be left out, until actually giving the coder the job? Do I have to give at least a vague idea of what the script does? I don't understand enough about what a programmer would need to know, but at the same time, I don't want to reveal my idea either. Can somebody help me on how much I am going to need to reveal? Thanks. Similar TutorialsHey I hope this is the right place to put this question.... I'm trying to make a social network(Just to test what i can do), and i wanted to make a feature so that u could check if a person is online or not. So the person could start a chat session with a user, i have no idea how u could make this. So i hope that there is some genius that will help me with this. Thank you - Nicolaj I've tried to use this http://www.bambalam.se/bamcompile/ .. but I cant get curl to work using the option to set the extension.. I need it to be able to sign into myspace or facebook with curl when it is in an exe.. everything else works fine with bambalam, everything but curl and connecting to an mysql db, I dont need to have mysql support, only curl.. what would be the easiest way to make this happen? btw the exe should just open a CLI and run the script, thanks Okay, On my original problem, I have been able to authenticate with the web service login service, and extract a cookie as follows from the web-service: $s_Cookie = $agLoginService->agGetCookie(); $s_Cookie = AGSESSION=oxhbjcKtPw5sOymAD8m8KcKR6JL4i+TIE5mZxwOrXLwCRr8iTOvPxA==; Now, I create data access soapclient: $agDataService = new SoapClient($s_DataURL, $a_SoapOptions); //yes I know I should build my own class wrapper around soapClient, but I am trying to make sure I know what to build before I do next in the process I need to set the cookie for the data access service. I tried using: <b>$agDataService->__setCookie('cookie', $s_Cookie);</b> but I don't think it's right because when I call any of the service's functions, I get no data back. This is what their engineer had to say ( he is no help in php at all) This is a question referring the http headers. He needs to set the cookies as given in the examples on the wiki page. The cookie is specified in a response http header as: Set-Cookie. So the http headers he got back are correct. The cookie he has to set is AGSESSION=oxhbjcKtPw5sOymAD8m8KcKR6JL4i+TIE5mZxwOrXLwCRr8iTOvPxA==; There should be an api for setting the cookie if not there is one for setting the http header. Set the http header name for the request (cookie - notice that is different than what you get back from an http response - read the rfc spec for http for all of the details) then set the value. The semi colon at the end is the delimiter for http headers (in the rfc). That is all he needs to do if he gets back some login error that means the cookies did not get set correctly. Any ideas or help will be great. Thank you. I need like, http://www.trackcourier.in/ The customer chooses selected courier service and enters tracking id then clicks its redirect to the appropriate courier service website. eg: If tracking id 12345 the redirect link should be https://www.fedex.com/apps/fedextrack/index.html?tracknumbers=12345&cntry_code=in How to do for India courier services? hello dear php-experts and freaks how to view photos and to rapidly change the major categories i have several hundred images (photographs) taht i want to view on opensuse linux version 13.1 i want to view the images - and of while doing so i want to turn the colored images into b/w Question; which is the best - ie. the quickest way to do so. note; i have installed the following thigns on my opensuse 13.1: - gimp the great grahical tool - digicam - the great tool to view images and pictures - Gwenview Version 4.11.4 on KDE 4.11.5 so again here the question: which tool allowes to view the color(ed) image and to turn it - on the fly - in to black and white? BTW: can i tell linux to swith the colors - in general - to black and white? is this doable... looks like we could write a small shell script, utilizing imagemagick. maybe like this: Code: for i in *jpg ; do mogrify -colorspace Gray "$i" ; done this is just a quick hack. i have tried. See more bleow: Also, it's not interactive and simply changes all jpg's to grayscale, even if they already are grayscale. please note that we need to have some more things about imagemagick. well see the results: martin@linux-70ce:~/Bilder> martin@linux-70ce:~/Bilder> for i in *jpg ; do mogrify -colorspace Gray "$i" ; done mogrify: unable to open image `*jpg': Datei oder Verzeichnis nicht gefunden @ error/blob.c/OpenBlob/2643. mogrify: no decode delegate for this image format `*jpg' @ error/constitute.c/ReadImage/552. martin@linux-70ce:~/Bilder> I have a website where users can add their friends. What I am trying to achieve is to show every user that who are their friends that are currently online. If any one knows a link to any script or tutorial that explains this, Please help. Thanks, Faisal I looked for a script that shows the number of users online on the site i am making, and found this. I don't know if it is for just showing if the user is online on that one page like a profile page, or if it is for all users in the database. Also, when using the code, it shows "Users Online: 1" then when I reload the page, it says "2' and again, then "3" even though no users have logged in. Thank you. the script Code: [Select] <?php ///////////////////////////////////////////////////////////////////////////////////////// ////IS USER ONLINE SCRIPT PART//// $session=session_id(); $time=time(); $time_check=$time-600; //SET TIME 10 Minute //CONNECT TO DB //connect info here // Connect to server and select databse mysql_connect("$host1", "$username1", "$password1")or die("cannot connect to server"); mysql_select_db("$db_name1")or die("cannot select DB"); $sql="SELECT * FROM $tbl_name1 WHERE session='$session'"; $result=mysql_query($sql)or die(mysql_error()); $count=mysql_num_rows($result); if($count=="0"){ $sql1="INSERT INTO $tbl_name1(session, time)VALUES('$session', '$time')"; $result1=mysql_query($sql1)or die(mysql_error()); } else { "$sql2=UPDATE $tbl_name1 SET time='$time' WHERE session = '$session'"; $result2=mysql_query($sql2)or die(mysql_error()); } $sql3="SELECT * FROM $tbl_name1"; $result3=mysql_query($sql3)or die(mysql_error()); $count_user_online=mysql_num_rows($result3); echo "User online : $count_user_online "; // if over 10 minute, delete session $sql4="DELETE FROM $tbl_name WHERE time<$time_check"; $result4=mysql_query($sql4); mysql_close(); // Open multiple browser page for result ///////////////////////////////////////////////////////////////////////////////////////////// ?> Hey everyone, I'm currently working on a friends online script and i have a slight problem that i need help with. Basically the code first searches "TBL_Friends" to see if you have any friends added. If it returns results it then turns your friends ID's into a variable. It then searches "TBL_Users_Online" to see if any body is logged based on the friend's ID it returned before. The first bit of the code works and it retrieves all the friends i got added. The second half is odd, if i have one or two friends added it will show that one is online. If i have more then three friends added it returns no results. I know my code is a bit sloppy and probably not the best way of writing it, im still learning PHP. Anyways this is the code, any help is appreciated. Code: [Select] <?php $FriendsOnline = mysql_query("SELECT Sender_ID FROM TBL_User_Friends WHERE Reciever_ID = $UserID"); while($fo=mysql_fetch_array($FriendsOnline)) { $FriendsOnlineID = $fo[Sender_ID]; $FriendsOnlineNumber = mysql_query("SELECT * FROM TBL_Users_Online WHERE User_ID = $FriendsOnlineID"); $FriendsNumber = mysql_num_rows($FriendsOnlineNumber); echo $FriendsNumber; } ?> $SenderID = Friends ID $Reciever_ID = User ID $UserID = User ID Hi, I just want to see what way you guys think is best. On this little community I'm building I have decided to implement a function to see who were active within the last 15 minutes. I made a table (just user and timestamp) to register the last activity of any logged on user. Then I have a variable to take off 15 minutes from that but I can't get them to compare. Googling the issue I found people are solving this in very different ways. I wanted to see what phpfreaks recommend as the next step. Here is some code (that doesn't work properly - no results found as I compare to different timestamps): Code: [Select] include_once'header.php'; $now=time(); $now=(date("Y-m-d H:i:s")); //$mins = mktime(0,$now-15,0, date("Y"), date("m"),date("d")); $mins = time(); $mins15 = $mins-(60*15); $mins15 = (date("Y-m-d H:i:s", $mins15)); $online="SELECT * FROM user_online" WHERE last_activity > mins15; $result = mysql_query($online); if (!$result) die ("Database access failed: " . mysql_error()); $rows = mysql_num_rows($result); echo <<< _END <div id='statusbar'> <h4>Online now: $rows</h4> I've been looking for a simple script that would connect to a game server to see if it is still online. I've found many, but not one of them work. They will permanently send back the text "Online", or "Offline". This is the simplest code I have found: <?php $ip = "66.79.190.40"; $port = "27960"; if (! $sock = @fsockopen($ip, $port, $num, $error, 5)) echo '<B><FONT COLOR=red>Offline</b></FONT>'; else{ echo '<B><FONT COLOR=lime>Online</b></FONT>'; fclose($sock); } ?> I'm also looking into getting it to pull the map name and player-list, but I should be able to figure that out on my own once I get this working. If it helps, this script is supposed to connect to the original Quake games(One, two, and three). I am making a simple script for my friend that uses mod_rewrite, but for testing I don't use the mod_rewrite link. The page is video.php The extension is ?title= I have having a problem when I type the title with a Single Quote in it('). Example. video.php?title=The-Sorcerer's-Apprentice I have str_replace for the dash(-) to be replaced as a space, so that's not the problem. Here's my code. <?php if($_GET) { $title="{$_GET['title']}"; $title = str_replace('_', ' ', $title); $title = str_replace('-', ' ', $title); if ($list = mysql_query("SELECT * FROM videos WHERE title='". mysql_real_escape_string($title) ."'") or die (mysql_error())); { if(mysql_num_rows($list) > 0){ if (mysql_num_rows($list)) { while($videos=mysql_fetch_array($list)) { ?> <div id="content"> <center><h3><?php echo $videos['title']; ?></h3> <object width="640" height="385"><param name="movie" value="<?php echo $videos['youtubelink']; ?>"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="<?php echo $videos['youtubelink']; ?>" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object> <br/><br/><a onclick="javascript:history.go(-1)" href="#">Go Back</a> </center> </div> <?php } } } ?> Hey guys. I just recently started learning php and I like to learn hands on. So, my first project involves the Google Calendar. I found a script on github that is basically a Google calendar feed and I've been manipulating it to meet my personal needs and expectations, but the only thing I am struggling with is the xml part. All I want to do in this case is get the value from ###TITLE### (after it is sorted by newest date which is done automatically in the script) and store it in a new variable but no matter what I try or do and after reading a bunch of material on xml and php, I still cannot get it to work. If anyone knows how to do this and provide an explanation so I can actually learn I would really really appreciate it. Here is the github script https://github.com/m...ter/gcalphp.php
Thank you and I am looking forward to any suggestions or anything.
Hi, I am pretty much a new newbie when it comes to PHP, and have a problem that I need to solve, for a website that has to go live tomorrow. Basically I have been using a javascript upload script called 'uploadify' which had an option for the upload folder which was added to the script in the form: Code: [Select] 'folder' : '/songs/<?php echo $_SESSION["name"];?>', I added the php echo to return the username from a PHP login, so it gets added to the path to the upload folder (each user has their own subfolder for uploading to). With the new version of the uploadify script, the folder option has been moved to a separate PHP file where it is now in the form: Code: [Select] $targetFolder = '/songs/'; I need to find a way of adding the username variable to this line. I have tried using echo in various ways, and googled about, but it has stumped me, simple as it may be. If anyone could let me know how I construct this line I'd be very grateful. Time is of the essence, as they say... Thanks, Nick I know it needs a for loop, but i don't know where in the code i should be putting it? Code: [Select] function check_input($value) { // Stripslashes if (get_magic_quotes_gpc()) { $value = stripslashes($value); } // Quote if not a number if (!is_numeric($value)) { $value = "'" . mysql_real_escape_string($value) . "'"; } return $value; } $_POST = array_map('check_input', $_POST); $sql="INSERT INTO testimonials (CustomerName, Town, Testimonial, SortOrder, Images) VALUES ({$_POST['customername']}, {$_POST['town']}, {$_POST['testimonial']}, {$_POST['sort_order']}, '$imgname' )"; } if (!mysql_query($sql,$con)) { die("<br>Query: $sql<br>Error: " . mysql_error() . '<br>'); } echo "<p align=center><b>1 testimonial added</b></p>"; mysql_close($con); Thanks in Advance, Steve You would think the answer would be all over the Internet and easy to find, but it’s not. I have searched many times, and in all the multitude of search results I have still never found an adequate usable answer. The MOST you ever find is someone saying how easy it is with PHP, but they don’t tell you how, even when the person they are answering asks them (odd). You can be that one in a billion person who finally answers it for real and helps someone out. I have a simple HTML form with data fields first_name, last_name, email, phone, country, a few hidden inputs, and a single submit button, like so: (Please note: the method is GET, not Post.) <form action="https://MyDomainOnMyServer.com/MyPHPScript.php”> <input type="text" name="first_name" value="" /> <input type="text" name="last_name" value="" /> <input type="text" name="email" value="" /> <input type="text" name="phone" value="" /> <input type="hidden" name="type" value="type123"> <input type="hidden" name="project" value="new123"> <select required name="country"> <option value="">Choose your country</option> <option value="US">United States</option> <option value="CA">Canada</option> <option value="GB">United Kingdom</option> <option value="Many More">Many More Countries</option> </select> <input type="submit" value="Submit Form" /> </form> NOTE: Originally, the form action would have been: action="https://TheirExampleDomainOnTheirRemoteServer.com/TheirRemotePHPScript.php" name="form1234" Upon clicking the single submit button only, what I need to have happen is this: 1. Send me an email to whatever@whatever.tld containing all the form submission data 2. Place the form submission data into a MySQL database having the corresponding data fields 3. Send the form submission contents including the hidden input values to "https://TheirExampleDomainOnTheirRemoteServer.com/TheirRemotePHPScript.php" name="form1234" AS IF that had remained set as the original form action to begin with So basically what I’m trying to obtain is the cleanest possible PHP script that will do those three things, which is essentially what others have asked for over the years in search results I have found, but no one has ever provided it in a clear instance that works. If I can just see such a script, I should be able to see how it works and then do what I need. Thanks. Reply PHP script return 20 UL LIST values like, < ul >
A < /ul > How to display UL LIST into row wise 5 columns like
A B C D Hi This non php person would sure appreciate some help. My site has a simple search box. Upon searching for a keyword, it returns listings which match 1 of 10 keywords included in that specific listing- skey. $query .= " and keywords like '%$skey%' and category like '%Mycategory%'"; I would like to also have the "bname" field checked for the specific keyword and included in the listings returned. Not knowing php at all, I tried this $query .= " and keywords like '%$skey%' or '%bname%' and category like '%Mycategory%'"; and $query .= " and keywords like '%$skey%' or '%$bname%' and category like '%Mycategory%'"; which did not work. A little help with correct code would be great. Tks, Larry Hi, I've been scratching my head for a while now about how to do this, I'm relatively new to php and mysql and perhaps foolishly taking on creating a user area for a website. I have everything else working, all of my register account functions and confirmations and all of the login scripts etc. I have created a profile page which returns various information to the user (this bit works fine) and I've got some nice show/hide toggles running with some javascript/css but my intention is to allow the user to change thier information (e-mail address, contact phone number and also whether they are subscribed to the e-mail list), it also displays any support tickets or messages. So after the long intro, here's what I'm struggling with... I have a form in a visibility toggled <div> which submits a 'change_email' script, so a user wants to change their e-mail, clicks on change, the <div> appears, they bang in the new e-mail and hit submit. My php script appears to work (because it doesn't throw up any errors), until you realise that actually it's not updated the record in the db... I'm using mysql_query("UPDATE users SET email='$new_email' WHERE username='$user'"); Do I need to setup variables for all of the information in the db (name, username, password, email, contno etc etc) and include them in the command to get it to work or should that just pick the correct record and then update it? If that is the case is there a way I can include 'blank' variables so I don't have to set them all up... e.g. mysql_query("UPDATE users SET user='',password='',email='$new_email', etc WHERE username='$user'"); Many thanks in anticipation I have a site where people vote, currently if two computers that are on the same network vote, my site will see them as one computer because I only track people by IP address. What would be a good way to track 2+ computers with the same IP address? |