Jump to content

hockey97

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by hockey97

  1. Hi, I have see websites like mega_upload. Where when you upload something they generate a URL customized for that individual. For example : people that use paypal to sell digital products. They have a PHP script where once after payment their server generates a customized URL to the file. This URL expires in a given week. If you didn't download it by then. You would need to pay again. Which would generate another customized URL. I have a website that has images and I want more security around images. I don't want the end user to clearly or easily know where the source is by looking the the webpages source code. I currently have a php file that grabs the image and renders it. This can prevent hot linking to a image and other stuff like un-authorized access to the images. However,this image still gets shared to authorized people. I just want to give the user more control over how the image can be used. I don't want people to easily download a copy of the image. If they know the source they can easily just download the image. I was told that I need to create a PHP script and uses apaches rewrite. The PHP file will grab all images and render them. I can then use this url as the images source. It gives me that 2 layer security where only authorized users can access them and the URL changes every time you load a page. So, you cannot know the original link. I plan to have a feature where the user can permit another user to download certain photos. I just want to add more security on images to prevent people from getting cyber bullied or other nasty things from the internet.
  2. I don't understand why I am not getting any reposes??? Is this impossible? I am pretty sure it should be possible. All you need to do is replicate what the paypal checkout page does. I think I am missing 3 security variables not being passed back to paypal's servers. That is why I am getting the error. I am just having trouble finding what exactly I need to pass. I passed everything I have seen in the first header.
  3. Hi, I have my own paypal checkout process. Here is what my system does. Makes client pay via paypal. I will then check if the payment was made and paypal confirms the payment. Then my code will process an order to my supplier. I will have to send an order request to my suppliers servers. Now that's not the problem. I can do that without any issues since they have their own api. Now, the issues is that items must be prepaid. I have to pay them before processing the orders. Once paid I cannot get any money back. So, I already put in money in my account with the supplier. Now, I have it before sending the orders. I login to my account and check the total balance of my account. I then have to figure out if I need to pay them more or not before processing the orders or sending the orders to my supplier. The problem is that if I need to refill my account. They don't have an api function for that. They only have it manually that you have to login to my account and hit the refill link. The refill link will pretty much redirect you to a paypal checkout express page for that company. Anyways, that is the problem. I cannot log into paypal to accept the charges. I mean I can login but for some reason it doesn't process the transfer for me to make the payment. Any ideas on how I can automate the payment process by going thru a merchants checkout express paypal page?
  4. Ya, it's supposed to be there. I even tried not using it. It won't show me any webpage at all. It returns nothing back. I am pretty sure you need to include that question mark. It's urlencoded or supposed to be urlencoded.
  5. I echo out what is curl executed. I get a login html page back. Yet, I am supposed to get the page after you login. However, I don't get that page. Since I am trying to login to my suppliers webpage. so I can check my wallet balance and figure out if I have to refill my wallet to process orders via their api. I can process orders via their api but I cannot refill my wallet and they gave me permission to use Curl to automate the process where I log into my account and then check the wallet balance and figure out how much refilling I need if any. They only allow a minimum of $40 bucks to refill at each refill. So I can't refill my wallet by $39 or less.
  6. I don't get what you mean? I am sending a post login data to my suppliers website. It's not mine. They have an api but that api doesn't allow me to login to my account to check my virtual wallet. I need to log into my account to check my virtual wallet to see the balance and then determine if I need to refill it and if so then by how much? the minimum I can refill it is by $40. I cannot refill by less.
  7. Does anyone have any idea what is going wrong?? I been stuck on this for weeks.
  8. Here is the code: function curl_with_cookies($url, $postdata = false, $cookies = false, $ssl = false, $url_encode = false , $post_encode = false, $unserialize = false ) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($curl, CURLOPT_USERAGENT, "spider"); curl_setopt($curl, CURLOPT_AUTOREFERER, 1); if($ssl) { curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($curl, CURLOPT_SSLVERSION,3); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($curl, CURLOPT_CAINFO, getcwd() . "/domain_x.pem"); } if($cookies) { if($postdata) { $make_file = fopen('cookies.txt', 'w+'); curl_setopt($curl, CURLOPT_COOKIEJAR, 'cookies.txt'); } curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies.txt"); } if($postdata) { if($post_encode){$postdata = http_build_query($postdata);} if($url_encode){$postdata = urlencode($static_post);} curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata); } $ret = curl_exec($curl); if ($ret === FALSE) { $ret = curl_error($curl); } if($unserialize){ $ret = unserialize($ret);} curl_close($curl); return $ret; } I made that function and here is how it's used: $data = "?username=user&password=pass"; curl_with_cookies('https://user.supplier.com/login',$data, true, true);
  9. Hi, I am doing business with a supplier. However, the supplier has an api that I can use but it's only to process orders. I buy the products at a wholesale price. They have 2 methods. one where I can have them charge my clients and then I get comission off the sale and they ship directly to my clients. Or I can buy them and it be shipped to me. I have to prepay for them. I have to have money in a virtual wallet. I can only refill the wallet with a minimum of $40. So, here is the issue. The issue is that the supplier doesn't have the api to refill the wallet. I have to manually login and refill the wallet. I want to automate this process. So, the website is using https and apache mod_rewrite. So, currently I setup the ssl part correctly with the certificate etc and verifying and all goes good. The problem is that I cannot login. I get no error at all. When I ECHO out the curl execution I get the page displayed with the login form. It's showing that it cannot get past the login page. I would like to know how I can access my account because I need to grab my wallet total to determine if I need to refill and if so I will refil $40 at minimum. So anything I am buying to resell is less then $40 in total. I will have to refill at $40. If the total is higher then $40 then I will refill the amount that my order is totalled too. So if I am buying $50 dollars worth of stuff. I would refill $50 for my wallet. So, I need to login and access my account and then grab wallet total and get total of the order to process. I then will figure out if I need to refill my wallet and then verify if it's refilled. Then once all is good then process the order to the company. I used live headers to see the headers when I login. I then use that url as the url for the curl target. it's something like https://domain.com/login I need someone to show me either a tutorial or explain the whole concept. You don't need to provide me with the code. I pretty much can write the code. Just need to know what functions I need to use or what Curl opts I need to use to successfully log into a https website. I am currently echoing out the curl execution to visually see that it gets logged in. I am looking for that page that shows my account being accessed.
  10. No, I am not looking for a WYSIWYG. With that you still have to write code. I just created a script and got it to work. I now have a working script that will generated the programming code via by you using my GUI on my website. So, don't need the help anymore. Took me 4 days to figure out how I can write it without getting any errors.
  11. no, I am creating the interface to my site so they don't need to touch code. I think it's possible. I have seen computer software programs. That you can buy for like $200. you buy it and via buttons clicking you make a make a website. Like the software generates the code and files into a folder. Then you just ftp that folder to your server and walla a fully functional website in php and javascript that you didn't touch a single line of code at all. I seen these programs. I so far never seen a website do the same function. I know it's possible because it if weren't then how can hackers inject sql code or make some cross side scripts that will run on your website. I mean what's the difference if a human wrote it or a computer script wrote the code? I mean we all know the structure of a function function function_name (arguments) { code insert here } that's a function. if we know this then why can't we build one dynamically?
  12. what do you mean by dynamically generate content? What I want is to allow my clients to be able to design their website from ground up without touching any code. I am not talking about using templates or something that is preset beforehand. It needs to have the same effect like how programmers are able to create their website from ground up. I want my clients to have th same freedom. Yet, not need to know how to program websites or anything.
  13. Is there a way where I can create a function that has a name? the reason is that I want to make a interface via javascript. that when they right click on a element a menu fades in and in it one will be called processes. Which when clicked I want to have a drop down menu that shows all functions the person created. So it would show the name of the function. That way when it's selected they can also set the inputs to the function. I basically need to have my code create the code. This is where I am getting at. Problem right now don't know how I can generate or create with my own php code a function.
  14. I am trying to make a layout editor for my clients.. I am starting my own web hosting company. I want to allow my clients to be able to go to my website and login. Then they will have access to their account area. The account area will have a layout and settings section. when you click layout editor you will go to a new page that shows at the top a drop down menu of all files created so far. He can create a new page, or delete a page or modify a page. He can modfiy the layout and even program it. For example, he can create his own databases and fill it with data. He can then grab that data and throw it out on his pages. The thing is that I want a programming interface but don't feel comfortable to allow them to directly touch code.I don't want to have to deal with possible hackers to hack my website/ server. So, I want to allow them to still program their website but they shouldn't have to know how to program to do this. It be easier for none technical people but at the same time will prevent the highly technical people to be able to do any damage to my server. So, I need a way to generate web pages with my own code that will generate php code and put it in these files and also generate javascript code and html and css for each file. Think of it like dreamweaver it's a software that assists you to making a website. Yet, I want to make something like that but not allow you to actually touch code just click buttons or graphics to get the desired results or like right click on elements created on the page. So, my problem is how can I make a script that will allow my clients to edit their website just as how a programmer can edit their website without having them touch a single line of code.
  15. Well, In the file it might have other code. Plus would that function work... but I need to know how I can create the function. I don't want to manually write it. I want my own script to generate the new function. so the function be like $blah = monkey function $blah ($money) { if ($monay > 100) { echo " Your rich!!! ";} the above would be something like this: function monkey ($money) { if ($monay > 100) { echo " Your rich!!! ";} that way in the file or page I can then put monkey(800); Which would spit out that I am rich on the screen. Because 800 is greater then 100. I need the function to be generated. I know how to make my own functions. I just don't know how you can make a script generate or assemble it's own functions. or create new functions each time those functions are runed.
  16. I seen that in the manual but don't know exaclty if that is what I am looking at. I want to basically create a function on the fly and then store that new function in a file. For example... lets say I want to make a menu where you can name the function and then select the arguments and use a GUI interface to create the function or the logic that function should be doing. then my script will grab those inputs read it and make sure nothing is harmful got written. Then store the code in a file. Would that function you told me about do the trick? can you give me an example of how to use it?
  17. Hi, I am trying to make a function that generates a function. in otherwords want to make a function that can make a function. for example: function makefunction($name,$args,$code){ $assemble = function $name ($args) {$code} ; return $assemble; } makefunction("tim","$money","if($money > 100){echo\" your really a rich man \";}"); echo tim(500); The example should print out to screen the man is rich. I basically want to assemble the function and then later on use that function. Is this possible? If so how would this be done? I basically want to make a function that generates a function that can be stored in a file.
  18. what I mean by can I still make a html form effect where when you hit the submit button it redirects you to the paypals page. I am saying to use javascript where I will via ajax post.. the variables to my php script or I might just directly post them to paypals page. Then after that is done I redirect the user to the paypals page where they enter their paypal or credit card information. I fully can't picture in my head that this will be possible. I think javascript ajax will post the data before the person gets redirected to to paypals page. I would think the data would get lost or out of sync. because when a html form is submitted... the data gets posted to paypals page at the time the user gets redirected to that page the post occurs. the reason I have to use javascript is because the form will generate the cost of the hosting services to charge the person. I then will need to create an account and setup the website. which requires most of the input in the form to be posted to my own php file to do that stuff. yet the same form needs to pass a few variables to paypal and redirect the person to paypals check out page. I can't use the standard html form effect. since you can only post to one webpage. If it's able to be done.... how would one do it... just give me the concept. I can code the stuff myself. I just for some reason in my mind think you need to post the variables at the same time you redirect the person to paypals page. I don't know exactly how that paypal page works. Or is it that you when you post the variables to that page it will allow you some time to redirect the user to that page to see he variables values. For instance the charges they need to pay. I don't want to redirect the user for them to see a charge of $0.00 and no items selected. this is what I think will happen.
  19. so, would I redirect the user via javascript to the paypals page... after making a ajax post to that paypals page. I am confused how I can make the same html form effect. Where it redirects the user to paypals page but also passes html variables.
  20. Hi, I am working on a order system. I want to know if it's possible to use curl in php to send paypal data and redirect person to their page. I am using paypal standard which needs me to pass variables to the paypal page at the same time the user needs to redirected to their page. I am talking about the same effect as html's form. you may ask why not just use html form if that is the same effect I want or need. well it's because I need to chop up the form. I am selling hosting services. In the form I want them to pay for the stuff but at the same time I will create their account and have it ready after they make payment they can start using their services that they bought. So, I need one submit button that when click it will do many things. It will generate an account for the user which means the database and create folders on my server etc. I will then need to verify that the payment been made via paypal... either they paid by credit card or by paypal. once I verify via ipn I then update the database that the user made payment. I was thinking to pass these html variables and inputs to php and have functions process them. do you think I can still make the html form effect where the user gets directed to paypals page to enter their credit card information and other stuff???
  21. so if be like this? $result ---> this be what mysql spit out. $a = array('foo' => $result); that be how I assign or populate the array from a database?
  22. no, I am saying in that $a variable... if inside that array.. that bob and boo if you replace them with variables... how can you instead of directly writting the stuff... how can you populate the array.... like if I got fruit names in my database... how would you grab them from the database and then put thing inside an array?
  23. but then how do you use variables inside the arrays? like all examples you showed where static arrays.. meaning you had to hand code it yourself. how can you populate the array via variables?
  24. here is my code: error it's javascript inside a php file. so you will see echo it's just because it's inside php. I used a while loop. It generates the code.
  25. how would you do that? I tried to do this just now but it's not working. I am getting a empty select tag. how would I use variables inside the array instead of hand writting the content?
×
×
  • 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.