Jump to content

ankur218

Members
  • Content count

    24
  • Joined

  • Last visited

Community Reputation

3 Neutral

About ankur218

  • Rank
    Newbie
  • Birthday 08/21/1993

Contact Methods

  • MSN
    ankur218
  • Website URL
    http://
  • ICQ
    0
  • Yahoo
    ankur218

Profile Information

  • Location
    Chennai

Previous Fields

  • Languages
    C, C++, (X)HTML, CSS, JavaScript
  1. Hello everyone,I am making a resource directory for my college. I don't know PHP and I am learning things along the way. I have created the upload part successfully using dynamic dropdown lists. I have added 3 levels, first to choose which stream/dept, then which semester and then which semester, and on clicking upload, the files goes to the desired directory correctly.Now, I want to know how to display all the files that are being uploaded? They are all in the directory. How do I list them and show my users/visitors so that they can choose what to download? The example I have attached only has 2 engg streams, 2 sems under both, and 2 subjects under each sem. I want to list out all in a segregated way. Say a page that has CSE/SEM1/ Data Structures/all the files under this category, another page has CSE/SEM2/Networks/all the files under this category. And not only list out but also form a link so that they can download it.Please check my attachment/link and please help me overcome this problem at the earliest.http://www.mediafire.com/?hevt1f4a1rpbyvpThank You
  2. Using PHP cURL to authenticate Login

    @justsomeguy: I couldn't quite get you. I guess I posted my problem on what I am trying to do. If you don't mind, can you get me a sample code of it?
  3. working on a university assignment, and needing some help

    I am happy for you my friend. Good luck with your project
  4. Dynamic Drop Down List

    Thank you all people but I did it using JavaScript and PHP, if anyone wants to know how, please let me know, I shall post the source code here for reference
  5. working on a university assignment, and needing some help

    Check out bootstrap documentation and then customize by adding your desired colors to the CSS file. That should do
  6. What is the html code to make horizontal boxes...

    Try using tables like DarkxPunk mentioned but yeah CSS gives you a better option using float and positioning methods. You will be more pleased with your result once you learn CSS.
  7. Html Exercise

    There are many sites out there. I would suggest codecademy. And there are many others like codecadamy too. But like Birbal said, see a website, try to code it. If you can't see the source code, reverse engineering trick. You will learn a lot in that way and know the variations quite well.
  8. How to cURL a JSP page

    I am trying to cURL my university login page. I want users to enter their university id and pass in my website, my website will curl to university website, authenticate and then allow them to login or give error accordingly. But my university portal is a jsp page. And after having posted in StackOverflow and other forums before, this is what I came up with. I need further help on where I am going wrong and how to rectify it. <form class="form-horizontal" action="curl.php" method="POST"> <div class="control-group"> <label class="control-label" for="inputEmail">Username</label> <div class="controls"> <input type="text" id="inputEmail" placeholder="Username"> </div> </div> <div class="control-group"> <label class="control-label" for="inputPassword">Password</label> <div class="controls"> <input type="password" id="inputPassword" placeholder="Password"> </div> </div> <div class="control-group"> <div class="controls"> <label class="checkbox"> <input type="checkbox"> Remember me </label> <button type="submit" class="btn">Sign in</button> </div> </div> </form> Now this is my curl.php file: <?php $address = "http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin.jsp"; //site URL $post = "username=txtRegNumber&pass=txtPwd"; //Parameters to be sent. Written like GET. $welcomeMessage = "Welcome..."; //This is the message that is displayed when a login is successful $options = array( CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)', CURLOPT_POST => true, //using post CURLOPT_URL => $address, //where to go CURLOPT_POSTFIELDS => $post, //input params CURLOPT_RETURNTRANSFER => true, //Returns a string value of the request CURLOPT_SSL_VERIFYPEER => false, //Avoid SSL problems CURLOPT_COOKIEFILE => 'cookie.txt', //Save cookies CURLOPT_COOKIEJAR => 'cookies.txt' //Cookies located CURLOPT_USERPWD ==> [username]:[password]); if (strpos($content, $welcomeMessage) !== false){ /* Do whatever,I don't know what to do here though */ } curl_close($ch); //close connections ?> Please let me know where I am going wrong, why I am not able to login and after logging in, how to log out.Thank you.
  9. Using PHP cURL to authenticate Login

    This is my form <form class="form-horizontal" action="curl.php" method="POST"> <div class="control-group"> <label class="control-label" for="inputEmail">Username</label> <div class="controls"> <input type="text" id="inputEmail" placeholder="Username"> </div> </div> <div class="control-group"> <label class="control-label" for="inputPassword">Password</label> <div class="controls"> <input type="password" id="inputPassword" placeholder="Password"> </div> </div> <div class="control-group"> <div class="controls"> <label class="checkbox"> <input type="checkbox"> Remember me </label> <button type="submit" class="btn">Sign in</button> </div> </div> </form> And this is my curl.php file. <?php$address = "http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin.jsp"; //site URL$post = "username=txtRegNumber&pass=txtPwd"; //Parameters to be sent. Written like GET.$welcomeMessage = "Welcome..."; //This is the message that is displayed when a login is successful$options = array( CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)', CURLOPT_POST => true, //using post CURLOPT_URL => $address, //where to go CURLOPT_POSTFIELDS => $post, //input params CURLOPT_RETURNTRANSFER => true, //Returns a string value of the request CURLOPT_SSL_VERIFYPEER => false, //Avoid SSL problems CURLOPT_COOKIEFILE => 'cookie.txt', //Save cookies CURLOPT_COOKIEJAR => 'cookies.txt' //Cookies located CURLOPT_USERPWD ==> [username]:[password]);//more params may be found here: http://php.net/manual/en/function.curl-setopt.php//--$ch = curl_init(); //Initialize curl in $chcurl_setopt_array($ch, $options); //add params values to $ch$content = curl_exec($ch); //executeif (strpos($content, $welcomeMessage) !== false){ //if the welcome message displayed... /* Do whatever */}curl_close($ch); //close connections?> Tell me where am I going wrong?
  10. Using PHP cURL to authenticate Login

    Okay, let me try making it simpler. I have a login page. I enter my university id and password. My login form checks against the university's id and password using curl and if successful I can enter the website else I am stuck at the login page itself. My college doesn't have any API key and all. Could you please help me do it using cURL?
  11. Using PHP cURL to authenticate Login

    Hi everyone,I am building an Academic Resource Directory for my University and I need help with the following.I want all the students and teachers to be redirected to a page, the page contains 2 login forms, one for students and the other for teachers. No one in my college would sign up so I am planning to make them login using the id and password provided by the university. My college may not give access to the DB and also doesn't have any API key, so I just want the users to put in their id and pass, my form will validate and authenticate by redirecting to my college site, checking for credentials and make them login or give error message accordingly. Now after googling a bit, I found that this can be done using PHP cURL I suppose. I don't know much of PHP and I have learnt most of the things along the way while making this site. I would like to continue doing the same.This is the place where all our college students login.http://evarsity.srmuniv.ac.in/srmswi/usermanager/youLogin.jspPlease give me some examples on how to go about with the comments next to each statement. Other alternatives are welcomed too.PS: I would like to do this without seeking my college's permission. I don't want to steal any data. Just check if the result is true and make them login.Thanks in advance!
  12. About Heroku

    Hello everyone,I am new to this cloud application hosting stuff. And lately I have been hearing a lot about Heroku. So I wanted to know few stuffs about it because I googled a lot but couldn't find convincing answers.So what does Heroku actually do? Does it host websites too?How do the plans and pricing work? What are these web dynos and worker dynos? What are production databases? What all can I run on Heroku?How good is the free plan for development and testing purpose? How do I know which is the suitable plan for me?After some of these basic questions are answered, I would like to query more considering I have some basic knowledge about Heroku.Thank you.
  13. Dynamic Drop Down List

    Hello everyone,I am building a file uploading/download section for my University. I don't have much knowledge about JavaScript or PHP (very basic, that too only if I see the code at times).So I want it to be this way. The students go to the page and there they have about 3-4 drop down lists. First they have to choose which Engineering Department they belong to, then which semester they are in and accordingly the subjects show up, they choose the subjects, press the next or whatever button, they are redirected to a page where all the files are present.For example: Say I want to download the notes of Data Structures from 3rd sem. So there are 3 Engineering Courses, CSE, ECE and Mechanical. I choose CSE, when I choose CSE, in the next Drop down, 8 semesters are there in the list, I choose 3rd, all the 3rd sem subjects show up in the next list, I choose DS and then I click next to go to a page or directory where those files are present.Refer, BookMyShow site for a clear view of the picture.Can someone post a sample code for this please taking the above example. I googled, but didn't find convincing ones since I didn't have vast knowledge about JavaScript.Oh yeah, I am using Bootstrap from Twitter to design it. So for the dropdowns also I will use the same.Thank YouCheers^_^
  14. id and class confusion

    Hello everyone, I am new to CSS. I was going through many references but none of them made me understand the difference between id and class. I saw many css files but couldn't figure when they are used and when they must be avoided. Could you please explain me in detail? Cheers
  15. Learn HTML5 Directly?

    Yeah, let me learn this HTML, CSS, JS properly first then. After that I shall move back to HTML5 and see the new features alone.
×