Jump to content

YBthebest

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Everything posted by YBthebest

  1. Hey ! Well, I really don't know how to use cURL that...complex... Do you have any examples?
  2. using System.Net; using System.Collections.Specialized; ... ... /// <summary> /// Logging in to the OCR Terminal server /// </summary> /// <param name="username">Username (User must be ‘allowed’ to access the API)</param> /// <param name="password">Password</param> public static void login(string username, string password) { // URL of login page string uriString = "https://www.ocrterminal.com/api/user.cgi"; // User Agent string userAgent = "APIClient:" + username; // Create a new WebClient instance WebClient myWebClient = new WebClient(); myWebClient.Headers.Add(HttpRequestHeader.UserAgent, userAgent); // New NameValueCollection instance to hold custom parameters NameValueCollection myNameValueCollection = new NameValueCollection(); // Add necessary parameter/value pairs to the name/value container myNameValueCollection.Add("version", "1.0"); myNameValueCollection.Add("username", username); myNameValueCollection.Add("password", password); // Upload the NameValueCollection and get result byte[] responseArray = myWebClient.UploadValues(uriString, myNameValueCollection); // Decode and record the response string sLoginResult = Encoding.ASCII.GetString(responseArray); if (sLoginResult.IndexOf("User exists") > 0) { // Login was successful; process result // ... } else { // Login was unsuccessful; handle failure // ... } } I don't know if this can help, but this is the basis code. It is an API and they only give an example with C#, so I tried to ''translate'' it to PHP! maybe it can help! Thanks
  3. Hey! Tried it, still the same error :/
  4. Hello! This is my code: $postdata = http_build_query( array( 'version' => '1.0', 'username' => 'YBthebest', 'password' => 'MYPASSWORD' ) ); $username = 'YBthebest'; $opts = array( 'http'=>array( 'method'=>"POST", 'header'=>"User-Agent: APIClient:YBthebest\r\n" ) ); $context = stream_context_create($opts); $result = file_get_contents('https://ocrterminal.com/api/user.cgi', false, $context); Warning: file_get_contents(https://ocrterminal.com/api/user.cgi): failed to open stream: HTTP request failed! I get that error! What is failing? And yes, I need to send my username through User_agent !( // User Agent string userAgent = "APIClient:" + username;, taken from C example) Thanks !
  5. Hello! I've got an issue! I'm trying to pass a very very long variable from JS to PHP through $_GET, but it seems too long for get. Is there any encryption function that works on both JS and PHP, so I can encrypt it in JS, send it though GET and decrypt it in PHP? Thanks !
  6. Oh and if that link doesn't show any image... http://extreme-redeemer.com/math_captcha There you go
  7. http://tutudragon3.info/maths_problem_image.php I see an image herE? $url = file_get_contents($url_image); echo $url; and $url is that url above Thanks
  8. Hello! http://tutudragon3.info/maths_problem_image.php My problem is: I want to get the link to this image...but in .jpg, see what I mean? a file_get_contents of that page gets me some weird binary text and stuff. Is it possible? Thanks !
  9. Nobody ? I actually really need this ! Thanks !
  10. Hello! I want to know, do you know any FREE and WORKING PHP ocr? I really need it for an image. There are only numbers (between 1 and 50) and the singns +, - and *. And how can I use it/install it? Thank you so much!
  11. Well if it can work for me...yes please ^^ I'm not sure at all, just need something :/
  12. Is it rworking for you? How? It still is not working for me...and no that website does not check on the useragent...arghh Still waiting for an answer! Thank you very much, I love you guys
  13. Sorry for that! Well the problem it, it should show me the page with the auctions (prizes) but it shows me the 301 ( it's on Lockerz.com's server, you can see that at the bottom of the page ). Maybe the login is not OK? I don't really know cURL very well. Thank you so much...
  14. Hello! I would like to use cURL to login to the website: lockerz.com I have some code, but it doesn't seem to work: <?php // INIT CURL $ch = curl_init(); // SET URL FOR THE POST FORM LOGIN curl_setopt($ch, CURLOPT_URL, 'http://lockerz.com/auth/login'); // ENABLE HTTP POST curl_setopt ($ch, CURLOPT_POST, 1); // SET POST PARAMETERS : FORM VALUES FOR EACH FIELD curl_setopt ($ch, CURLOPT_POSTFIELDS, 'email-email=EMAIL@hotmail.com&password-password=PASSWPRD'); // IMITATE CLASSIC BROWSER'S BEHAVIOUR : HANDLE COOKIES curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); # Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL # not to print out the results of its query. # Instead, it will return the results as a string return value # from curl_exec() instead of the usual true/false. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // EXECUTE 1st REQUEST (FORM LOGIN) $store = curl_exec ($ch); // SET FILE TO DOWNLOAD curl_setopt($ch, CURLOPT_URL, 'http://lockerz.com/auction'); // EXECUTE 2nd REQUEST (FILE DOWNLOAD) $content = curl_exec ($ch); // CLOSE CURL curl_close ($ch); echo $content; ?> Thank you very much if you can help!
  15. Well you say it won't work but that is really weird...I've got a script that checks if there is some changement in a page, by checking if there is a <form on the page or if an image is still there ( the two methods work ) but they don't work when the page changes....and what they do, they add a header redirection on the first page and then it redirects to the second page, the important page. So my script doesn't detect any change it the page... And when I enter the URL of the second page, it detects the change... I'm lost! Did you understand anything xD?
  16. Hey all! Well the title is quit clear! I wanted to know how I can, through PHP, detect on a webpage if it uses the header() function to redirect to another page, in php! ( something like this : header('Location h31uh23i.php'); ) I think I need to use cURL for this! Thank you very much if you can help me!
  17. Ah thank you...that was very dumb of me Saves me lots of work, thanks!
  18. Hey, don't judge to quickly. I really AM NOT gonna spam a website, seriously, not. I saw that code on a website, a romanian PHP website, and I wanna see till where it helps. I know that there are lots of OCR php script, well not alot but they exist, but they have difficulty with numbers...Ithat's why I'm asking it here. If you don't want to help me, because it's captcha "cracking", I can understand! Thanks
  19. Well this code is not on my page, but on another page. Just imagine I've got 2 files. The first one will simply make the image, and the 2nd one will get the image through...JS maybe, and then I need to get the 3 thingies... Do you understand? Thanks
  20. Hey! Well after My question: there is: I've got an image: http://extreme-redeemer.com/math_captcha/image.php I want to "decrypt" it, to get 3 different parts. The first number, the operatror and the last number. I actually want to be able to make this operation in PHP. I know PHP well, but I'm not familiar with the GD library! Thank you so much! And The Little Guy, http://pastebin.com/eu9UBmvm there you go! Thanks!
  21. Hello all ! My question is: I've got an image: http://extreme-redeemer.com/math_captcha/image.php I want to "decrypt" it, to get 3 different parts. The first number, the operatror and the last number. I actually want to be able to make this operation in PHP. I know PHP well, but I'm not familiar with the GD library! Thank you so much!
×
×
  • 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.