Jump to content

hassank1

Members
  • Posts

    239
  • Joined

  • Last visited

Everything posted by hassank1

  1. Hi I am creating an e-commerce website, where users who pay with their credit card are able to download pdf books. how can I make a PDF file only accessible for those users (who pay and validate their credit card) and not for everyone ? I want to know the main idea about securing these files.
  2. Hi I am working on a website where the change of the id (index.php?id=x) will lead to a different profile information based on the 'x' value till now, things are very simple, however, I want to change that so instead of example.com/index.php?id=x , I want to write example.com/userX similiar to when facebook create usernames instead of just a profile id I know that I can create directories each time dynamically (like user1,user2,etc... all directories) but isn't there another method where the links are virtual and not real directories ? so I can get the link and compare it with a database, instead of each time creating a directory then placing an index file inside of it that will redirect to the specific id ? ex : (db table) id name 1 user1 2 user2 etc..
  3. I may not be able to develop something from scratch in the limited time line, do you know any XML Flash script that will do a similiar job, (no need for text description, just similiar animation and on book click go to book URL) ? Thanks.
  4. Hii I have searched the net, but I didn't find what I am looking for I need something similiar to this to show books : http://www.hachettebookgroup.com/ it will show books behind each other,with a description for each one, but I want it to be CSS + JQuery.. does anyone knows any plugin or library available online that can do similiar work ? thanks
  5. thanks sasa, I still need a small regex, I want a regex that can detect a line that contains (require,require_once,etc..) and extract the file that was included, and it should work with ' and " ex: it should detect require("file.php"); => output1:require, output2: file.php require_once('file.php'); => output1:require_once, output2: file.php etc..
  6. thanks guys for the help, I will use the regex you suggested to parse the function, but I want the code to work on any php file (even if it is not mine) that means I can't place a unique delimiter, so I will make a code that will work on any php file, and I will keep you up to date with my progress,and the reason why I am doing this project,it is a good idea and I will share the code as an open source project..
  7. I have tested it on multilple functions in the same file, it didnt work correctly, and there's a problem when I have nested { } inside a specific function. by the way, I had to remove the $ from the end of the regex in order for the regex to work.. can you help me to solve the nested {} issue ?
  8. in ([\w\-]*) <== shouldn't be '_' instead of '-' ? because you are not allowed to put '-' in functions' name in php
  9. I am working on a small script that upload a php file,open it, read it into a string, and then save functions data into database. can you help me to parse the functions using preg ? (seperate function name,parameters,function body) ex1: function x1($p1,$p2) { echo 'test'; echo 'test'; } function x2() { echo 'hi'; } output: array[0]=>x1 , array[1]=> $p1,$p2 , array[2] => echo'test'; echo 'test'; array1[0]=>x2 , array1[1]=> (empty) , array1[2] => echo'hi'; etc..
  10. Hi I am developing a heavily news website where the site contains articles added by admins and comments to these articles added by visitors the DB design is pretty simple : table for articles and another for comments. however I am thinking since a big number of news will be added daily in addition to comments. is there a better way to implement the DB design to make it faster later on and for backup reasons.. or shouldn't I worry about that ?
  11. hii I am willing to create a pdf viewer similar to : http://www.albaladonline.com/viewer.php well actually I don't know from where to start.. I am a php programmer.. is there a well known libraries to import pdf and show them in this way? or is there an already open source or maybe an already made viewer that I can buy or download ? thx for the help
  12. Hi in my db there's a field called ExpiryDate which is a date field I want to execute a query that will get me all the users in which their account will expire in less than 15 days.. in other words all the users whose accounts will expire in less than 15 days thx I am using mysql 5.0.51 ..
  13. I am working on this site : http://www.magictouch-ae.com/synoptic/viewar.php however on FF menu works correctly. but in IE. . when I put the mouse over the submenu it moves some pixels to the right then a gap is shown between the submenu and its submenu and I can't access it !! can anyone give me a clue about why this is happening ? thx.
  14. I am thinking to add a field 'CreatorID' to the 1st table.. this would be a better idea in the long term isn't ?
  15. I am trying .. but I don't know how to get only the oldest PostID for a specific topic ... :S
  16. I need the best query that will get me all the TopicIDs written by a specific user (UserID) [i know it would be a better idea to save the creatorID with the 1st table,however I didn't think of that back then]. here are the 2 tables : 1- table name : boardtopics fields : TopicID - title 2-table name : boardposts fields : BoardPostID - TopicID - UserID - post - PostDate note: of course the 2nd table may have many posts belonging to the same TopicID but the 1st poster is the one who has the lower PostDate (he posted 1st) thx
  17. Hi.. I want to create a menu using the menu from this link : http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_horizontal_blue/ if the menu items are well known that's easy. however I want to build a menu and its submenus (could be many submenu levels..) where I get data from the database.. here's my table structure and an example of the data presentation MenuID - name - Link - ParentID 1 item1 ex0.com 0 <-- root menu 2 item2 ex1.com 0 <-- root menu 3 item3 ex2.com 1 <-- submenu of 1 4 item4 ex3.com 1 <-- submenu of 1 5 item5 ex4.com 2 <-- submenu of 2 6 item6 ex4.com 5 <-- submeny of 5 etc . . . I need help in implementing the code that will use the above method of creating menus (http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_horizontal_blue/). but with the items selected from the table. I appreciate any help.. thank you.
  18. Hi 1st I know encoding the php files isn't secure and can easilty been decoded.. however It's better than showing the code... ok well the issue is that I've php files I want to make them look encoded.. so I want the file to be something like eval(base64_orsomething(the code here)) <-- I think this is correct right? what I want to know is how to create [the code here] part .. from my php files ?
  19. Ok I spend days and days trying to fix a bug in my application... offline it's working ok .. but online the page behave unexpectedly ... so then accidently I've figured out that the value of a session is changed .. for example I've a session --> $_SESSION[iD] so whenever I set a variable .. $ID = 5 ... automatically $_SESSION[iD] become 5 .. I mean that's weird .. it's not happening offline.. so what's that exactly ? and could it be disabled? thx
  20. I have access to crontab in a plesk cpanel .. however the logs aren't inside the httpdocs .. they are one level up
  21. is there a difference between javascript and php cookies. and where cookies are stored.. and can I access them manually using ftp ?
  22. hmm sorry I've meant the vertical line after u select the language.. is that the line u meant ?
×
×
  • 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.