-
Posts
146 -
Joined
-
Last visited
Posts posted by ShivaGupta
-
-
keep getting
Missing a ;
<?php $file="test.bmp" $cmd="curl -F userfile=$file \ -F outputencoding=\"utf-8\" \ -F outputformat=\"txt\" \ http://example.com/ocr_scene.cgi >result.txt" exec($cmd, $result); echo $result; ?>
-
trying to build
<?php $file="test.bmp" $cmd="curl -F userfile=$file \ -F outputencoding=\"utf-8\" \ -F outputformat=\"txt\" \ http://example.com/ocr_scene.cgi >result.txt" exec($cmd, $result) echo $result; ?>
But keep getting
Parse error: syntax error, unexpected T_VARIABLE in /home/content/65/11169265/html/testt/index.php on line 3
looks like that's not the issue,help me out plzzzz:
-
i am new in php n dont have enough since to solve some provlemes myself.i am working with php using some examples and littile
Knowledgebut its imported for me .so plz help me .sorry for bed english.
i have this ocr class
<?php $client = new SoapClient("http://www.ocrwebservice.com/services/OCRWebService.asmx?WSDL" , array("trace"=>1, "exceptions"=>1) ); $params = new StdClass(); $params->user_name = "example"; $params->license_code = "xxxxx-xxxxx-xxxxx-cccccc"; $inimage = new StdClass(); $image = "xxxxx.png"; $handle = fopen("$image", 'r'); $card_image = fread($handle, filesize($image)); fclose($handle); $inimage->fileName = $image; $inimage->fileData = $card_image; $params->OCRWSInputImage = $inimage; $settings = new StdClass(); $settings->ocrLanguages = array("ENGLISH"); $settings->outputDocumentFormat = "TXT"; $settings->convertToBW = TRUE; $settings->getOCRText = TRUE; $settings->createOutputDocument = FALSE; $settings->multiPageDoc = FALSE; $settings->ocrWords = FALSE; $params->OCRWSSetting = $settings; try { $result = $client->OCRWebServiceRecognize($params); } catch (SoapFault $fault) { print($client->__getLastRequest()); print($client->__getLastRequestHeaders()); } var_dump($result); print("Done"); ?>
and here is their output
object(stdClass)#5 (1) { ["OCRWSResponse"]=> object(stdClass)#6 (2) { ["ocrText"]=> object(stdClass)#7 (1) { ["ArrayOfString"]=> object(stdClass)#8 (1) { ["string"]=> string(9) "VR eP gT " } } ["ocrWSWords"]=> object(stdClass)#9 (0) { } } } Done
i dont understand how to get string data "VR eP gT " frm output and save as text file.so plz give me a hint or a example.
-
how to save (JSESSIONID) then use later in curl. server suported ?
-
If you need to convert `.bmp` images to `.png', why use php?
i am working with a php built in ocr n that not acsept bmp.......acsept only png n jpg.so plz help me on that provlem.
-
solved.......
-
Need help in creating bmp to png in php.
-
curl -s -o out1.txt http://YOUR_URL/index.php?out=plain&filename=http://REMOTE_URL/image.png
plz give me exaple of how to use this code and save content of url as text file,
want to put url output content in text file
-
if yes (include images) then plz tell me how to save .
-
i have a text file that contant user name n pass in this format.
user111111,pass
1111111111,1111
2222222222,2222
3333333333,3333
4444444444,4444
5555555555,5555
6666666666,6666
7777777777,7777
8888888888,8888
9999999999,9999(or suggest me beter format for post data frm text file)
and i have this curl that working with "while" loop
$i = 0; while($i != 50) { // Your code here $i++; }
<?php $username ="8888888"; $password ="2417978"; $tomob ="888888888"; $myFile22 = "xxxxxx.txt"; $fh2 = fopen($myFile22, 'r'); $theData22 = fread($fh2, filesize($myFile22)); fclose($fh2); $raman = explode(';',$theData22); function randomstring() { $characters = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $param=rand(5,strlen($characters) - 1); $random_string_length = $param; $string = ''; for ($i = 0; $i < $random_string_length; $i++) { $string .= $characters[rand(0, strlen($characters) - 1)]; } return ($string); } $i = 0; while($i != 9) { $c = $_REQUEST['recaptcha_challenge_field']; $cv = $_REQUEST['recaptcha_response_field']; $cookie = tempnam("/tmp", "CURLCOOKIE"); $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,"http://example.com"); curl_setopt($ch,CURLOPT_COOKIEJAR,$cookie); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_REFERER,"http://example.com"); $one=curl_exec($ch); preg_match("/input name=\"(.*?)\" type=\"text\" class=\"existing_user round_four\" id=/i",$one,$matches); $user = $matches[1]; preg_match("/input name=\"(.*?)\" type=\"password\" class=\"existing_user round_four\" id=/i",$one,$matches); $pass = $matches[1]; $post_data = "$user=$username&$pass=$password&RememberMe=1&submit2=LOGIN HERE"; $url = "http://example.com"; $cookie = tempnam ("/tmp", "CURLCOOKIE"); $ch = curl_init(); curl_setopt( $ch, CURLOPT_USERAGENT,"User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0" ); curl_setopt( $ch, CURLOPT_URL, $url ); curl_setopt ($ch, CURLOPT_HTTPHEADER, Array("Content-Type: application/x-www-form-urlencoded","Accept: */*")); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie ); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); $ct = curl_exec( $ch ); if(stristr($ct,"number & password")) { echo "<font color='red'><b>Invalid mobile number / password. Try Again With Correct Details.</b></font>"; } else { if(stristr($ct,"xxxxx.php")) { { echo "<b><font color=red>ccccccccccccccccccc.</font></b><br>"; } $i++; } ?>
so here what i want.
first explode username and pass frm text file then intrigret with whil loop for post data @ $username ="8888888";
$password ="2417978";so can u help me with a example how to do that multi user login with 1 script.
.
-
hint key word : explode
YA i found this but their is no intrigation into text file.
<?php $str = 'one,two,three,four'; // zero limit print_r(explode(',',$str,0)); // positive limit print_r(explode(',',$str,2)); // negative limit print_r(explode(',',$str,-1)); ?>
-
i am using this to get data frm text file......
text file content.
345
in php
$fh=file_get_contents("test.txt");
and it working fine.
but here what i want.
text file content.
345,567,789,
in php
$fh="345"; $ch="567"; $dh="789";
so plz give me example how to get content.
thanx
-
No, it is not possible to do what you want. You can send the user's IP as additional data in the request, but you can't make it 'originate' from that IP. If your server is blocked, most likely you're doing something you are not supposed to be doing so naturally they are going to block you.
so i am sad. is there any alternative way of spoofing your IP address using PHP?
-
solved myself.
-
What exactly is the point? You would never receive the response.
the point is retrive visiter ip using this code. then $user_ip = IP address using CURL when you make requests to a server.........because server blocked my host resion many request s frm my ip so my ip get blocked.sory for my bad english..
function getUserIP() { $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forward; } else { $ip = $remote; } return $ip; } $user_ip = getUserIP();
-
Is it possible to send a different IP address using CURL when you make requests to a server?
-
Based on all of your other posts, I'm going to say you are in way over your head with whatever you're trying to do. Start from the beginning, learn the basics of programming, how to solve logic problems, then learn PHP syntax.
THEN attempt the project you're working on. We are not your tutors.
if ur not tutor so what you doing here .................if u not able to help stop posting in all my threed as the bla bla bla bla bla bla bla.........i dont want any help from you.................and if you think u r a big n good programer ...then u have misunderstanding.......because u dont have since to speek someone.................u r only a nonsence women........@admin freaksforrum .i will leave freaks forrum for forever so plz deleet my ac.
-
Then you're in the wrong place. This is not 1-on-1 tutoring, this is a help forum. We're not teachers. We are other programmers. If you want teaching, go to school. If you have a specific bug and you've already tried to fix it, this is the place.
off-topic.
-
We don't typically spoon feed people answers. You're going to have to do some research on your own, then come back with specific questions. I'll get you started on your research: http://lmgtfy.com/?q=php+cronjob
sorry to say but i think ur 1 valueble comment can teach me better then google .
-
$ac=$_POST['to']
i want to add 0 before post data ..........plzzzzzzz tell me how to deal ?
-
what is ip address @ php curl script ? can i chang with set option?
-
plz explain how to add Cronjobs in php scripts?
and is their any example or tutorial about Cronjobs in php scripts?
-
Hey, I'm actually having same problem as you have. Did your find a solution for this? if yes plzzzz help me...............
-
ÿØÿà JFIF ÿþ >CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
ÿÛ C
$.' ",#(7),01444'9=82<.342ÿÛ C
2!!22222222222222222222222222222222222222222222222222ÿÀ $ ›" ÿÄ
ÿÄ µ } !1AQa"q2‘¡#B±ÁRÑð$3br‚
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ
ÿÄ µ w !1AQaq"2B‘¡±Á #3RðbrÑ
$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ ? ÷ú(ªz¶¥£_j—#Aeo%Ä‹Š¢– dœQ@(®oIñ]γocwoá}elïR9#¹’K@¢7 ‡ N[9Æ öÏü&‹ÿ —ü"ÿ Ø:¯Û¼¯´ù™·òþÏæy~v|ÜíÏloÇðÐQEcè$³ñö§Øã?³u tù¼åt‘ãq\•ä`œjØ Š( Š( Š( Š( Š( Š( Š( °üi×^ñ
½¼RM<ºeÊGjYŒL rI<b·( OÀ>Ið®‹3ÿ iGxtÈh.¯gu¶)`"w*„Œä+íMÿ ×ûGû?Uûö'öoÚ³.<¿´}§vÝÛ1·ïû˜ï^‘E yŸ‚5øG.<Y©§k1=ψï.¡1éR¬‘1P®# ƒ´÷¯L¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š (¢Š ÿÙ
Parse error: syntax error, unexpected T_VARIABLE
in PHP Coding Help
Posted
Parse error: syntax error, unexpected T_VARIABLE in /home/content/65/11169265/html/testt/index.php on line 3